-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Series Chart X-axis does not recalculate on crossfilter data change #926
Comments
+1 |
Are you aware of any workarounds I could use in the mean time? |
Looks like you found the culprit, although I don't see your comment anymore: https://github.com/dc-js/dc.js/blob/develop/src/series-chart.js#L69 If our understanding is correct, this needs to be replaced with something that calculates from the current group rather than having frozen data. It could probably be replaced in each subchart. I will try to work something up later today if you don't figure it out first. |
Yes sorry I thought I was mistaken for a minute so took it down. I will try to figure it out. Thanks |
Actually it seems this is not the issue as when I changed the data and make a call to sub_chart.group().all() then I get the new data.This is probably due to the parent chart calling the '_chart._preprocessData' function on change. I think there is a missing step where there new data should be propagated to the object that is returned from sub_chart.data() as the values array in this object is empty on data change. I am however having a hard time finding where this is updated. Scratch this, you are correct. The chart.data call does not seem to allow updating the grouping function on the fly. This changes the group and _group functions on the chart but still accesses the original set when using chart.data Using a pseudo group as described here also doesn't work.I was filtering based on if the result of the seriesAccessor being run on the datum was equival to sub.key. |
Okay, this is a lingering effect of #454, where the points were getting filtered by the current domain and making it impossible to calculate elasticX. We have a special case to not filter the points by the current domain, when elasticX is true. But elasticX was not passed down to the child charts, so they were still getting filtered on the current domain. Passing elasticX down to the children fixes this. |
fixed in b836da4, dc.js 2.0.0 beta 9 |
fiddle pointing at develop version now works: http://jsfiddle.net/gordonwoodhull/tzcLzrhp/7/ i also had to add |
That is fantastic, thank you very much for all your help. Sorry I could not be more helpful! |
fixes dc-js#926 elasticX not working for series chart
When the crossfilter data is changed to data no longer matching the x domain then the graph appears to have no data. Here is a fiddle of the issue : http://jsfiddle.net/zvfqmzaz/
The text was updated successfully, but these errors were encountered: