dc-js / dc.js

Multi-Dimensional charting built to work natively with crossfilter rendered with d3.js
Apache License 2.0
7.42k stars 1.81k forks source link

Preserving State #45

Closed brianherbert closed 11 years ago

brianherbert commented 12 years ago

Is there a way to preserve state so that I can make a selection and then share that selection with someone else? ie. If I select a certain range, a URL could be set that would preselect the same regions. This would be useful when wanting to collaboratively work on a dataset with someone.

If this isn't available, consider this a feature request.

Keep up the awesome work!

NickQiZhu commented 12 years ago

We did something similar in one of the project but with some server side help. You can get all filter criteria from dc charts using chart.filter() function. Then we send it over to the server so the filtering criteria can be saved and reloaded next time user visits the same page, or in our case we use the criteria to generate report and do further analysis.

Another solution is to use html5 data attribute to save the filtering criteria on client's machine, and again chart.filter() function should get you what you need to store.