dc.js

D3.js - load csv file from chrome

馋奶兔 提交于 2020-06-27 08:49:10
问题 I 've got a webProject with dc.js (d3.js+crossfilter.js) and ndx.csv file. When i run project into chrome from visual studio, everythings is Ok. Now after build project and copy in other computers, Run that. The problem is here . When i try to run webProject [html file] in other computers with Chrome , this browser has error " XMLHttpRequest cannot load file:///C:/Users/9901/Desktop/WebSite1/ndx.csv. Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome

Plotting aggregated data with sub-columns in dc.js

空扰寡人 提交于 2020-06-23 12:36:38
问题 I have data in the form: data = [..., {id:X,..., turnover:[[2015,2017,2018],[2000000,3000000,2800000]]}, ...]; My goal is to plot the year in the x-axis, against the average turnover for all companies currently selected via crossfilter in the y-axis. The years recorded per company are inconsistent, but there should always be three years. If it would help, I can reorganise the data to be in the form: data = [..., {id:X,..., turnover:{2015:2000000, 2017:3000000, 2018:2800000}}, ...]; Had I been

How can I fill gaps in a dc.js series chart?

ぃ、小莉子 提交于 2020-05-28 07:34:49
问题 I have the following dc.js series chart: var data = [ {day: 1, service: 'ABC', count: 100}, {day: 2, service: 'ABC', count: 80}, {day: 4, service: 'ABC', count: 10}, {day: 7, service: 'XYZ', count: 380}, {day: 8, service: 'XYZ', count: 400} ]; var ndx = crossfilter(data); var dim = ndx.dimension(function (d) { return [d.service, d.day]; }); var grp = dim.group().reduceSum(function(d) { return +d.count; }); var chart = dc.seriesChart('#graph') .width(620) .height(175) .chart(function(c) {

How can I fill gaps in a dc.js series chart?

风流意气都作罢 提交于 2020-05-28 07:34:09
问题 I have the following dc.js series chart: var data = [ {day: 1, service: 'ABC', count: 100}, {day: 2, service: 'ABC', count: 80}, {day: 4, service: 'ABC', count: 10}, {day: 7, service: 'XYZ', count: 380}, {day: 8, service: 'XYZ', count: 400} ]; var ndx = crossfilter(data); var dim = ndx.dimension(function (d) { return [d.service, d.day]; }); var grp = dim.group().reduceSum(function(d) { return +d.count; }); var chart = dc.seriesChart('#graph') .width(620) .height(175) .chart(function(c) {

How can I fill gaps in a dc.js series chart?

て烟熏妆下的殇ゞ 提交于 2020-05-28 07:33:15
问题 I have the following dc.js series chart: var data = [ {day: 1, service: 'ABC', count: 100}, {day: 2, service: 'ABC', count: 80}, {day: 4, service: 'ABC', count: 10}, {day: 7, service: 'XYZ', count: 380}, {day: 8, service: 'XYZ', count: 400} ]; var ndx = crossfilter(data); var dim = ndx.dimension(function (d) { return [d.service, d.day]; }); var grp = dim.group().reduceSum(function(d) { return +d.count; }); var chart = dc.seriesChart('#graph') .width(620) .height(175) .chart(function(c) {

How can I fill gaps in a dc.js series chart?

筅森魡賤 提交于 2020-05-28 07:32:12
问题 I have the following dc.js series chart: var data = [ {day: 1, service: 'ABC', count: 100}, {day: 2, service: 'ABC', count: 80}, {day: 4, service: 'ABC', count: 10}, {day: 7, service: 'XYZ', count: 380}, {day: 8, service: 'XYZ', count: 400} ]; var ndx = crossfilter(data); var dim = ndx.dimension(function (d) { return [d.service, d.day]; }); var grp = dim.group().reduceSum(function(d) { return +d.count; }); var chart = dc.seriesChart('#graph') .width(620) .height(175) .chart(function(c) {

Reduce multiple indirectly-specified fields using crossfilter

ぐ巨炮叔叔 提交于 2020-05-16 17:55:00
问题 I have a CSV dataset that I am exploiting with dc.js (crossfilter). Date, Country 1,Country 2,Country 3,Country 4,Country 5,Country 6,Target country (...) 2014/12/11, USA, France, UAE, (...), Iraq The thing I am trying to do is to plot a row chart with one row per country. Here's my solution as of today: var countries = ndx.dimension(function(d) { var list = []; list.push(d["Country 1"]); if (d["Country 2"]) {list.push(d["Country 2"]);}; if (d["Country 3"]) {list.push(d["Country 3"]);}; if (d

Reduce multiple indirectly-specified fields using crossfilter

我们两清 提交于 2020-05-16 17:54:24
问题 I have a CSV dataset that I am exploiting with dc.js (crossfilter). Date, Country 1,Country 2,Country 3,Country 4,Country 5,Country 6,Target country (...) 2014/12/11, USA, France, UAE, (...), Iraq The thing I am trying to do is to plot a row chart with one row per country. Here's my solution as of today: var countries = ndx.dimension(function(d) { var list = []; list.push(d["Country 1"]); if (d["Country 2"]) {list.push(d["Country 2"]);}; if (d["Country 3"]) {list.push(d["Country 3"]);}; if (d

Integrate any D3.js Chart with DC.js

纵饮孤独 提交于 2020-05-14 18:52:24
问题 I am trying to figure out how to easily integrate any D3.js chart with the DC.js library so as to use the crossfilter feature between all charts. I also do understand a question of this nature has been asked before, adding the link for reference: DC.js - Listening for chart group render I was unable to understand or follow the answer and the following comment threads where @Gordon even gave a small minimal example. Can anyone help me out by putting out a sample code to better understand as to

dc.js charts with Angular2+

爱⌒轻易说出口 提交于 2020-05-11 05:43:56
问题 Has any one used dc.js with Angular2+ application. Any help or pointers will be appreciated. I am able to make my application running on normal html/java-script. Now I need to implement the same in Angular 2+ application. 回答1: Edit : A couple of weeks later I have a much better understanding and can maybe give some better instructions, so here It goes: After generating the angular project, install dc , its typefiles, and all needed dependencies like this: npm i --save dc @types/dc