dc.js

Dc.js applying range Chart to multiple graphs

泪湿孤枕 提交于 2019-11-30 05:19:54
问题 I have been working with dc.js for the last couple of weeks but there is one problem I just don't seem to be able to figure out. I want to be able to change the scales of four different charts based on a single chart with a brush filter. Something along the lines of: priorityTotChart .width(2*w/3).height(h/3) .margins({top: 10, right: 50, bottom: 20, left: 40}) .dimension(dateDim) .group(priorityTotal) .centerBar(true) .gap(1) .x(d3.time.scale().domain([minDate,maxDate])) .elasticY(true)

Properly display bin width in barChart using dc.js and crossfilter.js

你离开我真会死。 提交于 2019-11-30 04:54:49
I'm making a bar chart using the Dimensional Charting javascript library dc.js , which is based on d3 and crossfilter. All I want to do is display a histogram with a specified number of bins, this should be easy using the barChart function. I have an array called data which contains floating-point values between 0 and 90000, and I just want to display the distribution using a histogram with 10 bins. I use the following code to produce the histogram below: var cf = crossfilter(data); var dim = cf.dimension(function(d){ return d[attribute.name]; }); var n_bins = 10; var xExtent = d3.extent(data,

why does one chart not filter another in dc.js?

微笑、不失礼 提交于 2019-11-29 17:36:21
I am not able to understand how dc groups chart. So that the change in one filter reflects in all others. I have a simple code with two series charts. When I draw brush on one, it does not filter the other. Not sure why ? Can someone please have a quick look at the small code and suggest. d3.csv("data/compareData.txt", function(data) { ndx = crossfilter(data); runDimension = ndx.dimension(function(d) {return [+d3.time.format.iso.parse(d.timestamp), +d.meterid]; }); frequencyGroup = runDimension.group().reduceSum(function(d) { return +d.frequency; }); magnitudeGroup = runDimension.group()

Color code a data table in dc.js

﹥>﹥吖頭↗ 提交于 2019-11-29 11:57:16
I have a vary basic question and very little understanding of dc.js. I am trying to create a score card using the data that i have and display it as a data table using dc.js.I am processing the data through crossfilter. How can i color code the entries in the data table . Say my table will have values from -1 to 1 and i want to color the cells as follows: -1 to 0 : decreasing gradient of red 0 : white 0 to 1 : increasing gradient of green I know i am not able to provide any code but thats because i am at a total loss on how to achieve this. Help will be really appreciated. Thank you. You can

dc.js compatibility with v4 of d3.js

拈花ヽ惹草 提交于 2019-11-29 11:55:55
Version 4.x of d3.js , which is not backward compatible, came out end of June16. The bower.json for dc.js includes: "dependencies": { "d3": "3.x", "crossfilter2": "~1.3" } which explicitly requires v3 (not higher) of d3.js . Is dc.js currently compatibility with version 4.x of d3.js ? If not, is this planned? It's definitely not compatible. d3 v4 has breaking api changes. As far as plans go, there's a lively discussion about this on dc.js' github acount : So what is the plan then? Use @jfsiii suggetion of finishing off dc v2 using d3 v3 and then create dc v3 using d3 v4? Would upgrading to d3

Loading multiple CSV in DC.js, adding a value, and concatenating the results into a single dataTable

浪子不回头ぞ 提交于 2019-11-29 07:23:49
I have four CSVs with the same header information, each representing a quarterly result within a year. Therefore for one result I can load it and display it into a dataTable simple via d3.csv("data/first-quarter"), function(dataQ1){ dataQ1.forEach(function(d){ d.callTypes = d['Call Types']; d.callDesc = d['Call Description']; d.callVol = d['Call Volume']; d.quarter = 'Q1'; }); var facts = crossfilter(dataQ1); var timeDimension = facts.dimension(function(d){ return d.quarter; }); dataTable ... //data table attributes dc.renderAll(); }); However complications arise when I try to retrieve from

Using dc.js on the clientside with crossfilter on the server

久未见 提交于 2019-11-29 01:13:59
问题 I am working on creating interactive visualizations for large datasets. The datasets cannot be loaded in the browser due to their size. We're using crossfilter on a node server to load and filter the data serverside. I was wondering if I could somehow couple the server side crossfilter filters with dc.js charts. I am using d3.js right now to create charts but want to use the various charts that are already there in dc.js. We are basically filtering the data on the serverside and then

dc.js - Stacked bar chart with empty bin filter displaying in strange way

旧街凉风 提交于 2019-11-28 14:36:49
I'm trying to have a stacked bar chart and remove empty bins, the bar chart doesn't seem to display properly. It's adding whitespace within the bars themselves. The filtering is working fine. Probably best explained by having a look at this fiddle - http://jsfiddle.net/northside45/xdcvr2kf/ My filters look like this var personDim = ndx.dimension(function (d) {return d.person;}); var personDimGroup = personDim.group().reduceSum(function (d) { return d.amount; }); var personDimGroup2 = personDim.group().reduceSum(function(d) {return d.amount2;}); var personDimGroup_filtered_group = remove_empty

Multi-series bar chart in DC-js

久未见 提交于 2019-11-28 10:13:43
I'm using DC.js ( lib on top of D3 ) and have a great example of a single series bar chart: var xf = crossfilter(data); var dim = xf.dimension(function (d) { return d["EmployeeName"]; }); var group = dim.group().reduceSum(function (d) { return d["AverageSale"]; }); var chart = dc.barChart(elm); chart.barPadding(0.1) chart.outerPadding(0.05) chart.brushOn(false) chart.x(d3.scale.ordinal()); chart.xUnits(dc.units.ordinal); chart.elasticY(true); chart.dimension(dim).group(group); chart.render(); but I was wondering if it was possible to create a multi dimensional bar chart using this library. For

dc.js - data table using jquery data-table plugin

折月煮酒 提交于 2019-11-28 10:11:29
I'm using dc.js to create charts and data table. I wanted to add some pagination styles and search option in the table. jQuery Data table script : $(document).ready(function() { $('#data-table').DataTable(); }) problem is - i get all the jquery data table options displayed like search box, number of entries. But none of them work. Some one please help. Found this post . But nothing useful. I like to use DynaTable for this - http://www.dynatable.com/ 1) Define your table html: <table id="dc-data-table"> <thead> <tr> <th data-dynatable-column="client_name">Client</th> <th data-dynatable-column=