How do charts know how to update themselves?
See original GitHub issueLet’s say I have a chart with a specific dimension and group, such as:
var gender = xf.dimension(function (d) { return d.gender; }),
genders = gender.group().reduceSum(function (d) { return d.interactions; })
Then I have another chart, which when interacted with (perhaps a pie chart click), it alters the first chart. How does the first chart know that it needs to update based on the value click on the pie chart? I’d imagine it must somehow know about the interactions
property in order to rerun the reduce function such as:
// this runs inside the chart
group = group.reduceSum(function (d) {
if (d.key == valueClicked) return d.interactions;
else return 0;
})
Do interactions in DC.js actually involve rerunning the reduce functions or does it do it in some other way?
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Excel Tips: How to Make Charts Auto Update - GCF Global
Luckily, there is an easier way. Simply format your source data as a table, then create a chart based on that table. When...
Read more >How to Create Self-Updating Microsoft Excel Charts in 3 Easy ...
Self -updating Excel charts are huge timesavers. Use these steps to add new data and watch them automatically show up in a chart....
Read more >Update the data in an existing chart - Microsoft Support
Changes you make will instantly show up in the chart. Right-click the item you want to change and input the data--or type a...
Read more >How to auto update a chart after entering new data in Excel?
1. Select the data range and click Table under Insert tab, see screenshot: · 2. In the Create Table dialog box, if your...
Read more >Automatically Updating Graphs in Word or PowerPoint
I'm giving it away because I love you and I want to make your life easier). This is how you link Excel to...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
In fact, one dimension’s filter will only change the groups on other dimensions, and not the groups on that dimension. It’s documented, but the documentation is very terse.
https://github.com/crossfilter/crossfilter/wiki/API-Reference#dimension_group
I’m going to close this, because there isn’t really a dc.js request here. But hopefully this will help others.
I did not know that calling
dimension.filter()
for one dimension would also change other groups! Wish this was better documented on crossfilter’s site. Thanks this really cleared it for me.