Skip to content
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

permalink or href to share the visualisation filter state #490

Closed
Edouard-Legoupil opened this issue Jan 2, 2014 · 6 comments
Closed

permalink or href to share the visualisation filter state #490

Edouard-Legoupil opened this issue Jan 2, 2014 · 6 comments

Comments

@Edouard-Legoupil
Copy link

As recommanded here(http://stackoverflow.com/questions/20853794/dc-js-permalink-or-href-to-share-the-visualisation-filter-state), i am submitting this feature request.

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.

It would be great to have the capacity to freeze a certain filters state and pass it to a #href. Ideally such href would be then shared through a share button or through the regular facebook/twitter sharing function. The interface would be similar to the 'reset' button.

@gordonwoodhull
Copy link
Contributor

@Edouard-Legoupil, @cihadturhan, here is a good example you might start with:
http://cscheid.net/static/mlb-hall-of-fame-voting/

I'd be glad to consider a pull request to make this easier, but my understanding is that it's external to dc.js and crossfilter and doesn't absolutely need any special support.

@cihadturhan
Copy link

Thanks @gordonwoodhull, it actually does what I meant... It generates permalink successfully. I'll examine the code and see if it's reusable.

For a widget, I'm planning to do something like kibana plugin for elasticsearch. It shows all the filters the user applied. Here is a screenshot.

kibana

If you want to see it live visit demo page

@gordonwoodhull
Copy link
Contributor

Nice!

It may not be general or directly reusable but it should give the idea.

Btw I think jQuery got a little smarter since Carlos wrote that demo. You may be able to use JQuery.param() instead of a plugin:
http://api.jquery.com/jquery.param/

@Edouard-Legoupil
Copy link
Author

just in case someone is looking for this, a working example is here: https://github.com/edouard-legoupil/3W-Dashboard/

@gordonwoodhull
Copy link
Contributor

Another way to do this, saving the filters of all the charts on the page by index, shown in this question: http://stackoverflow.com/q/27675327/676195

Somewhat more brittle but a quick solution if the number and order of charts on the page will not change.

@mr23
Copy link
Contributor

mr23 commented Apr 8, 2015

Regarding the Legoupil proposal, I'd prefer a solution that encodes only the changed parameters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants