dc.js

dc.js permalink or href to share the visualisation filter state?

你说的曾经没有我的故事 提交于 2019-12-18 12:38:12
问题 I am working on a dataviz with dc.js (http://edouard-legoupil.github.io/3W-Dashboard/) The main limitation is that when users find a specific fact while they explore the data, it is not easy to reproduce the exact filters they used in order to share their findings with other users (and initiate a discussion). A solution could be to have permalinks for each filter state. dc.js has already the "dc.redrawAll();" to reset all filter but is there any capacity to freeze a certain filters state and

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

…衆ロ難τιáo~ 提交于 2019-12-18 09:38:57
问题 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 =

crossfilter: how to use crossfilters for start date and end date columns simultaneously

空扰寡人 提交于 2019-12-18 09:05:39
问题 I have a similar situation as in this question . Considering the same dataset, how can I perform this functionality through crossfilters. I am new to dc.js and crossfilter. I am trying to implement the bar and area plot as in this example. Even this example is using 1 date column. I am able to do it with the startdate only. However, my requirement is to filter datasets based on startdate and enddate. I could not found many resources that talk about the same issue. Any assistance and

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

半腔热情 提交于 2019-12-18 05:04:24
问题 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 ...

Multi-series bar chart in DC-js

試著忘記壹切 提交于 2019-12-17 19:28:27
问题 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();

Crossfilter reduce :: find number of uniques

这一生的挚爱 提交于 2019-12-17 18:33:41
问题 I am trying to create a custom reduce function for a dataset attribute group that would sum a number of unique values for another attribute. For example, my dataset looks like a list of actions on projects by team members: { project:"Website Hosting", teamMember:"Sam", action:"email" }, { project:"Website Hosting", teamMember:"Sam", action:"phoneCall" }, { project:"Budjet", teamMember:"Joe", action:"email" }, { project:"Website Design", teamMember:"Joe", action:"design" }, { project:"Budget",

storing dc.js filters in URI and restoring them

拈花ヽ惹草 提交于 2019-12-17 16:23:46
问题 Here i selected 3 filters 1 from each chart and pasted that encoded url in url param. but when i press decode url button it is redrawing only middle chart filters but not the remaining once.. what should i do? thanks function encodeFunction() { var filters = []; for (var i = 0; i < dc.chartRegistry.list().length; i++) { var chart = dc.chartRegistry.list()[i]; for (var j = 0; j < chart.filters().length; j++) { filters.push({ChartID: chart.chartID(), Filter: chart.filters()[j]}); } } var

Disable brush on range chart before selecting a scale from the dropdown/on page load(dc.js,d3.js)

荒凉一梦 提交于 2019-12-14 02:25:28
问题 Following my previous question Disable resize of brush on range chart from focus charts (dc.js, d3.js) - Solved and my previous fiddle,https://jsfiddle.net/dani2011/uzg48yk7/1/, still need to disable brush drawing on the range chart before selecting a scale from the dropdown and/or on page load (!isPostback): a) When panning /translating the line of the focus charts (bitChart,bitChart2) the brush is displayed on the whole range of the range chart: b) It is possible to drag the brush on the

How to handle transitions of custom elements generated by an event?

亡梦爱人 提交于 2019-12-13 19:09:40
问题 I'm wondering what the appropriate way is to deal with custom elements generated using on('renderlet', function(){...}) when you need them to transition smoothly? Any help would be great 回答1: It's now possible, as of dc.js 2.0.0 beta 11, to add elements in the 'pretransition' event, and at the same time add transitions on these elements. The transitions will run in parallel with the transitions on built-in elements. https://github.com/dc-js/dc.js/issues/806 chart.on('pretransition', function

how to highlight max and min points on lineChart

倾然丶 夕夏残阳落幕 提交于 2019-12-13 19:03:34
问题 I use dc.js lineChart and barChart. Now I need to mark the maximum and minimum values on my lineChart with 'renderArea(true)'. I want something like in the picture below or maybe something else, but I don't know how to add this feature. Update: Gordon's answer is perfect. Unfortunately, my chart doesn't show the hint with 'mouseover' on marked points One more update : How can I redraw these points after zooming? 回答1: This isn't something supported directly by dc.js, but you can annotate the