dc.js

dc.js charts with Angular2+

♀尐吖头ヾ 提交于 2020-05-11 05:41:06
问题 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

dc.js: stacked area chart using reduceCount method

烂漫一生 提交于 2020-04-30 07:43:47
问题 I'm fairly new to the dc.js/crossfilter/d3 trifecta, and have a question about grouping variables for building a stacked area chart. I've been following tutorials like this one that show how to generate a time series chart. This has been really useful, however my method of defining the .group() method of the chart is slightly different. In the example, the author has data of the form {'date': somedate, 'http_404': 20, 'total': 340 ... } where each type of http request has some sort of

dc.js: stacked area chart using reduceCount method

被刻印的时光 ゝ 提交于 2020-04-30 07:43:09
问题 I'm fairly new to the dc.js/crossfilter/d3 trifecta, and have a question about grouping variables for building a stacked area chart. I've been following tutorials like this one that show how to generate a time series chart. This has been really useful, however my method of defining the .group() method of the chart is slightly different. In the example, the author has data of the form {'date': somedate, 'http_404': 20, 'total': 340 ... } where each type of http request has some sort of

DC.JS create series plot using multiple columns

纵然是瞬间 提交于 2020-04-30 06:38:48
问题 I have the following below code and I would like to plot date on the x-axis and y-axis should have the values of total and tip on two separate series. Is this possible from DC? I can't find a way to determine series using a separate column instead of using a column to determine the series. Thank you var data = [ {date: "2011-11-14T16:17:54Z", quantity: 2, total: 190, tip: 100, type: "tab"}, {date: "2011-11-14T16:20:19Z", quantity: 2, total: 190, tip: 100, type: "tab"}, {date: "2011-11-14T16

DC.JS create series plot using multiple columns

僤鯓⒐⒋嵵緔 提交于 2020-04-30 06:37:45
问题 I have the following below code and I would like to plot date on the x-axis and y-axis should have the values of total and tip on two separate series. Is this possible from DC? I can't find a way to determine series using a separate column instead of using a column to determine the series. Thank you var data = [ {date: "2011-11-14T16:17:54Z", quantity: 2, total: 190, tip: 100, type: "tab"}, {date: "2011-11-14T16:20:19Z", quantity: 2, total: 190, tip: 100, type: "tab"}, {date: "2011-11-14T16

Unable to show the line in decreasing way in dc.js

家住魔仙堡 提交于 2020-04-18 06:32:34
问题 index.html: <div id="line-chart2" class="svg-container"> <div class="chart-title"> <span> <strong>Line Types</strong> </span> <span> <a href="javascript:lineChart2.filterAll(); dc.redrawAll();" style="display:none;" class="reset">reset</a> </span> </div> </div> index.js: const lineChart2 = dc.lineChart("#line-chart2"); var data = crossfilter([{foo:"one",bar:1},{foo:"two",bar:2},{foo:"three",bar:3},{foo:"one",bar:4},{foo:"one",bar:5},{foo:"two",bar:6}]); var dim = data.dimension(function(d) {

Box plot with dual dimension and dual x-axis using dc.js

时光毁灭记忆、已成空白 提交于 2020-03-04 05:04:10
问题 Is it possible with dc.js to draw two x-axis of a graph i.e. one is below and one is above. One Dimension/ x-axis contain a b and above x-axis contain 1 (a b with below a-axis) 2 (a b with below x-axis). An img is attached to explain the view. If it is possible kindly give some suggestion. Regards. 回答1: As for adding lines between the box plots, here is a hacky solution that works ok. Would probably need some work to make it general. Assume we have the domain ( ['1A', '1B', '2A, '2B', ...] )

dc.js disable brush resizing

喜你入骨 提交于 2020-03-03 10:06:05
问题 I am trying to disable brush extent on a line chart and set a fixed width. I am aware this subject has been discussed several times. I have tried without success to work on this answer: Disable brush resize (DC.js, D3.js) but I couldn't find a solution matching my situation. If it makes any difference, I am expanding on the brushable ordinal chart discussed in this question: DC.js - Custom ordering of ordinal scale line chart Here is the chart initialization code: line .width(950) .height(350

dc.js Incorporate regression chart into existing scatterplot with crossfilter

别说谁变了你拦得住时间么 提交于 2020-03-02 09:41:32
问题 I am using dc.js and crossfilter.js to create a d3 dashboard, and am wondering how to implement a regression line into a scatterplot chart that responds to filtering. I have been playing with a few examples re adding a regression line, but I have been unsuccessful extracting and incorporating the code. I don't have a problem with the math, but rather with how to access the filtered data from the dimension, and then how to add the regression line to to the filtered scatterplot chart (so that

how to roll up dc stacked-bar example into single bar?

我怕爱的太早我们不能终老 提交于 2020-02-25 07:14:38
问题 "http://dc-js.github.io/dc.js/examples/stacked-bar.html" I want to roll this kind of dataset into a single bar stacked-bar chart. I changed the speedSumGroup = runDimension.group().reduce(function(p, v) { p[v.Expt] = (p[v.Expt] || 0) + v.Speed; return p; }, function(p, v) { p[v.Expt] = (p[v.Expt] || 0) - v.Speed; return p; }, function() { return {}; }); to speedSumGroup2 = runDimension.groupAll().reduce(function(p, v) { and inspecting the group shows the data rolled up to the single expected.