dc.js

Uniformly-spaced histogram bins with dc.js?

巧了我就是萌 提交于 2021-01-27 06:33:11
问题 Mike Bostock uses the following snippet to generate uniformly-spaced bins for a histogram: var data = d3.layout.histogram() .bins(x.ticks(20)) (values); source Is there any way to adapt this to a project that uses dc.js and crossfilter.js? Essentially, I want to dynamically generate the bins and then use the chart to filter on a particular attribute. Total newbie to this. Any guidance would be appreciated! 回答1: dc.js supports histograms via crossfilter. Use a group for your bar chart that

Nested Grouping with Crossfilter?

余生颓废 提交于 2021-01-05 07:09:29
问题 New to cross filter and working on a project that needs to maintain summed totals and peak values of those summed totals over a date range. Tried to utilize the complex reduction from the dc.js examples. I was able to get the max of a specific make and model over the date range but not the summed total peak (summed by day) for say the Region dimension or color dimension. The project requires the following charts. A bar chart that shows the total daily peak inventory count by region(s) A

Nested Grouping with Crossfilter?

随声附和 提交于 2021-01-05 07:08:51
问题 New to cross filter and working on a project that needs to maintain summed totals and peak values of those summed totals over a date range. Tried to utilize the complex reduction from the dc.js examples. I was able to get the max of a specific make and model over the date range but not the summed total peak (summed by day) for say the Region dimension or color dimension. The project requires the following charts. A bar chart that shows the total daily peak inventory count by region(s) A

Nested Grouping with Crossfilter?

风流意气都作罢 提交于 2021-01-05 07:07:37
问题 New to cross filter and working on a project that needs to maintain summed totals and peak values of those summed totals over a date range. Tried to utilize the complex reduction from the dc.js examples. I was able to get the max of a specific make and model over the date range but not the summed total peak (summed by day) for say the Region dimension or color dimension. The project requires the following charts. A bar chart that shows the total daily peak inventory count by region(s) A

Nested Grouping with Crossfilter?

馋奶兔 提交于 2021-01-05 07:07:35
问题 New to cross filter and working on a project that needs to maintain summed totals and peak values of those summed totals over a date range. Tried to utilize the complex reduction from the dc.js examples. I was able to get the max of a specific make and model over the date range but not the summed total peak (summed by day) for say the Region dimension or color dimension. The project requires the following charts. A bar chart that shows the total daily peak inventory count by region(s) A

dc.js: Bar chart on subset of data

混江龙づ霸主 提交于 2020-12-13 12:15:11
问题 I have data in format [ { "date": dt1, "action": "T", "isRequest": "", "delay": 0 }, { "date": dt1, "action": "C1", "isRequest": "R", "delay": 10 }, { "date": dt1, "action": "T", "isRequest": "", "delay": 0 }, { "date": dt1, "action": "C2", "isRequest": "R", "delay": 20 }, { "date": dt1, "action": "T", "isRequest": "", "delay": 0 }, ... ] Main bar chart is about counts (1 line in array), all delays chart is about delay distribution (attribute delay) Filtering by date main graph, changes data

Conditional custom X Value dim name when no filters are applied to DC.js Chart

落爺英雄遲暮 提交于 2020-12-13 03:11:36
问题 Had a follow-up question Original Question which was to group by both color and day, and then find the max day for each color. Gordon did a great job explaining how to keep a running sum for each color per day and find the max. Now I am trying to show the total sum of all colors and their respective peaks in a bar chart. In short I am looking for a single data point that sums the peak values into a total value and displays Total. I am confused what I should use for the dimension as I want a

How to make columns wide (not pencil-thin) on dc BarChart with time x-axis

帅比萌擦擦* 提交于 2020-07-10 07:07:42
问题 I have a barchart set-up as follows: function makeGraphs(recordsJson, factorText) { // Clean data var records = jQuery.parseJSON(recordsJson); let parseDate = d3.timeParse("%Y-%m-%d"); records.forEach(function(d) { d.date = parseDate(d.date); d.factor = d.factor == true ? 1 : 0; }); // Create a Crossfilter instance var ndx = crossfilter(records); // Define Dimensions var dateDim = ndx.dimension(d => d.date); // Group Data var dateGroup = dateDim.group(); var factorGroup = dateDim.group()

How to make columns wide (not pencil-thin) on dc BarChart with time x-axis

百般思念 提交于 2020-07-10 07:07:30
问题 I have a barchart set-up as follows: function makeGraphs(recordsJson, factorText) { // Clean data var records = jQuery.parseJSON(recordsJson); let parseDate = d3.timeParse("%Y-%m-%d"); records.forEach(function(d) { d.date = parseDate(d.date); d.factor = d.factor == true ? 1 : 0; }); // Create a Crossfilter instance var ndx = crossfilter(records); // Define Dimensions var dateDim = ndx.dimension(d => d.date); // Group Data var dateGroup = dateDim.group(); var factorGroup = dateDim.group()

How to make columns wide (not pencil-thin) on dc BarChart with time x-axis

前提是你 提交于 2020-07-10 07:07:18
问题 I have a barchart set-up as follows: function makeGraphs(recordsJson, factorText) { // Clean data var records = jQuery.parseJSON(recordsJson); let parseDate = d3.timeParse("%Y-%m-%d"); records.forEach(function(d) { d.date = parseDate(d.date); d.factor = d.factor == true ? 1 : 0; }); // Create a Crossfilter instance var ndx = crossfilter(records); // Define Dimensions var dateDim = ndx.dimension(d => d.date); // Group Data var dateGroup = dateDim.group(); var factorGroup = dateDim.group()