dc.js

How to filter a dataTable in dc.js without affecting other dimensions

爷,独闯天下 提交于 2020-02-04 00:40:07
问题 So for a while I had struggled with how to filter a dataTable in dc.js without affecting other dimensions. This seems counter-intuitive, as it goes against what crossfilter(the data filter behind dc.js) does best, but I'll explain why this can be relevant. Suppose I have a dataset of peoples name age and gender. In one of my datatables, I only want to display males; using one crossfilter, I would be forced to filter all my other datatables by males. Suppose I also have a pie chart that lists

DC.js to React conversion

£可爱£侵袭症+ 提交于 2020-02-02 11:17:27
问题 Is there an example for dc.js to react conversion? Interested in line chart,table and timeSlider (bar chart with brush). Any help would be appreciated. Thanks! 回答1: This is the begining of converting DC.js into React. The versions of the used library are as followed (package.json): "dependencies": { "babel-polyfill": "^6.3.14", "bootstrap": "^3.3.6", "crossfilter": "^1.3.12", "d3": "^4.2.8", "d3-request": "^1.0.2", "d3-scale": "^1.0.3", "d3-time-format": "^2.0.2", "dc": "^2.0.0-beta.32",

DC.js to React conversion

断了今生、忘了曾经 提交于 2020-02-02 11:17:00
问题 Is there an example for dc.js to react conversion? Interested in line chart,table and timeSlider (bar chart with brush). Any help would be appreciated. Thanks! 回答1: This is the begining of converting DC.js into React. The versions of the used library are as followed (package.json): "dependencies": { "babel-polyfill": "^6.3.14", "bootstrap": "^3.3.6", "crossfilter": "^1.3.12", "d3": "^4.2.8", "d3-request": "^1.0.2", "d3-scale": "^1.0.3", "d3-time-format": "^2.0.2", "dc": "^2.0.0-beta.32",

DC.js - Custom ordering of ordinal scale line chart

穿精又带淫゛_ 提交于 2020-01-25 04:14:06
问题 Please forgive my english. I am trying to create a line chart with ordinal scale and brushon function. I successfully set brushing on ordinal thanks to this method : https://dc-js.github.io/dc.js/examples/brush-ordinal.html And now I need to set the x-axis values order. My data is like this : [{"id_commune":4,"datation":"-30/-20","effectif":0.09,"commune":"Frejus","lieu_dit":"Les Aiguieres","departement":"83","pays":"FR","longitude":6.73703399,"latitude":43.433152,"quantite":1,"id_datation":1

crossfilter.js with dc.js update charts on callback group change

风流意气都作罢 提交于 2020-01-25 00:29:08
问题 I have a factory for creating dc.js charts which uses crossfilters functions bound to $scope. Plnkr Example $scope.updateMyPie = function(data) { var cf = crossfilter(data) $scope.mypie.dimension = cf.dimension(function(d) { return d.key }) $scope.mypie.group = $scope.mypie.dimension.group().reduceSum(function(d){ return d.value }); } chart factory takes all chart properties through the DOM via angular directive so the tags are like so <mypie id="mypie" chart-dimesion="mypie.dimension" chart

dc.js - is it possible to show the user grab handles upon page load

偶尔善良 提交于 2020-01-24 20:12:48
问题 I'm building a basic dashboard for internal use. I've little experience with D3 / SVG etc so please excuse me if this is obvious: Aim I have a time series of values, one value per date for a full year. Inspired by the example on the dc.js wesbite, I'm displaying a 'mini' bar plot of the entire series, and allowing the user to select a range which in turn sets the limits of the axis scale range of a 'large' line plot. By default (on page load / refreshAll()) I've set the limits of the large

How to remove additional prompt option “Select all” from dc.js selectMenu? [duplicate]

亡梦爱人 提交于 2020-01-24 19:32:05
问题 This question already has an answer here : Change text and remove Select All from dc.selectMenu (1 answer) Closed 3 days ago . I have a dimension with the values A,B,C,D. I would like to create a selectMenu with dc.js, where the value A is selected by default only one value can be selected (no mulit-selection) always one value has to be selected a) I used .multiple(false) and expected that a single value is selected by default. However, the default state of the menu is to select all available

Conditional coloring in dc charts

我与影子孤独终老i 提交于 2020-01-16 18:54:12
问题 I am using dc.js a to create a pie chart to show gain and loss, How can I put some condition based on which the color of the pie chart changes. I have tried using .colors(['#fdd752', '#AEC785', '#a48ad4', '#3acdc7']) // (optional) define color domain to match your data domain if you want to bind data or color .colorDomain([-1750, 1644]) // (optional) define color value accessor .colorAccessor(function (d, i) {console.log(d); return d.value; }) Any ideas? 回答1: Just like X-axis scales, the

Conditional coloring in dc charts

泄露秘密 提交于 2020-01-16 18:53:08
问题 I am using dc.js a to create a pie chart to show gain and loss, How can I put some condition based on which the color of the pie chart changes. I have tried using .colors(['#fdd752', '#AEC785', '#a48ad4', '#3acdc7']) // (optional) define color domain to match your data domain if you want to bind data or color .colorDomain([-1750, 1644]) // (optional) define color value accessor .colorAccessor(function (d, i) {console.log(d); return d.value; }) Any ideas? 回答1: Just like X-axis scales, the

Conditional coloring in dc charts

▼魔方 西西 提交于 2020-01-16 18:53:07
问题 I am using dc.js a to create a pie chart to show gain and loss, How can I put some condition based on which the color of the pie chart changes. I have tried using .colors(['#fdd752', '#AEC785', '#a48ad4', '#3acdc7']) // (optional) define color domain to match your data domain if you want to bind data or color .colorDomain([-1750, 1644]) // (optional) define color value accessor .colorAccessor(function (d, i) {console.log(d); return d.value; }) Any ideas? 回答1: Just like X-axis scales, the