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

Feature Request: Scroll bar for chart legends(dc.legend). #1300

Open
rrameshkumar76 opened this issue May 17, 2017 · 2 comments
Open

Feature Request: Scroll bar for chart legends(dc.legend). #1300

rrameshkumar76 opened this issue May 17, 2017 · 2 comments
Milestone

Comments

@rrameshkumar76
Copy link
Contributor

rrameshkumar76 commented May 17, 2017

It would be great to have ability to have a scroll bar for chart legends like in http://jsfiddle.net/ramseyfeng/80afu8kc/

We have pie charts with lots of slices and so lots of legends, It will be great to have a way within dc library for it to add a scroll bar. It works on the above example by wrapping the svg with a div and setting overflow: auto. I was not able to do the same as dc legend is in a "g" element. Is there a work around for this?

@rrameshkumar76 rrameshkumar76 changed the title Feature Request: Scroll bar for chart legends(dc.legends). Feature Request: Scroll bar for chart legends(dc.legend). May 17, 2017
@gordonwoodhull
Copy link
Contributor

It's a good idea. SVG doesn't generally support scrollbars within the content, but I believe you can pan specific areas of the canvas using d3.zoom.

Another possibility is to have a miniature version of the legend which can be brushed or panned along, as suggested in #1259. (This is sort of a super-scrollbar.)

@gordonwoodhull gordonwoodhull modified the milestone: v2.1 May 24, 2017
This was referenced Jul 26, 2017
@gordonwoodhull
Copy link
Contributor

Or probably the easiest way to do this is to keep the legend separate (e.g. using html legends from #1329) and then just scroll using html, similar to the way @ialarmedalien implemented a scrolling row chart in this example: https://bl.ocks.org/ialarmedalien/0a4bf25ffc0fb96ae569a20f91957bc1

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

No branches or pull requests

2 participants