If the legend has more entries than fit on the screen it could create a scrollbar. This removes the burden from the developer to collapse all items after a given depth.
2012-05-15: Implemented scrolling legend: http://jsfiddle.net/highcharts/3Yd7B/
2011: I created the POC for using a HTML div for the legend items: http://jsfiddle.net/highcharts/nULxz/
For now it should be considered a hack. It has obvious weaknesses like unability to show marker symbols, and invisibility in export, but having a scrollbar in a static image doesn’t make much sense anyway.
Also the hack doesn’t reflect dynamic changes to the series of the chart.
Rui Xie commented
As Frank Reno mentioned : "It would be great if we can have a way to disable this completely. I imagine if its NULL, we should never see the pagination controls. but currently, the controls will still kick in."
I don't know how it worked before, but without the ability to display all the legend items at the same time, it defeats the purpose of legend to some extent. For example, you can't get a proper export with the navigation on.
Frank Reno commented
It would be great if we can have a way to disable this completely. I imagine if its NULL, we should never see the pagination controls. but currently, the controls will still kick in.
Eric Edem commented
In the case of horizontal legends this doesn't really work, as the paging buttons are forced to the bottom, instead of appropriately floating to the left or right. Also, having multiple pages of legend items causes weird clipping issues.
I will open a new issue "Horizontal Legend Paging", but really scrolling legends should probably be reopened as what was added was not "scrolling" but "paging".
Thank you Torstein, nice work.
At export time, it's only necessary to show the legends for active series, at least that should be an option. Even though we have a lot of series, users will rarely enable more than 10, this should not require a long or scrolling legend in the export. What's the good of showing a legend for a hidden series, when it can't be enabled after export? You may need to redraw the series box/layer before export in this case.
this works great, exactly what I need, thanks!
per the comments on this discussion: http://highslide.com/forum/viewtopic.php?f=9&t=18185 PLEASE make disabling scrolling an option! I don't know why it wasn't in the first place...
@Cassio: I have fixed the zIndex issue.
@Yiannis: It will be released very soon, hopefully this week or the next.
Torstein, I notice that when I use background styles for the legend box the scroll controls disappear.
It's just a suggestion to switch the order of the 'control element' with the 'legend box' itself, both are children of the <g class="highcharts-legend" .. > element.
Torstein, I have the latest version 2.2.3 and I couldn't emulate your results. Does that mean that this fix (2.2.2) wont be included in the next versions of highcharts?
This is a really important issue for me too: http://highslide.com/forum/viewtopic.php?f=1&t=17769
When should we expect this to be released?
This will be a very helpful feature with hundreds of data set. Thanks.
This is great. I can start with this. I think if I have time, I'll work on updates to the series since we have a lot of code that updates the series dynamically.
Need this one ASAP..we have urgent requirement..
Pleas do ASAP ..we have urgent reqirement
pls give asp. . .
Highcharts already has a way of displaying the legend in a tabular format. See http://highcharts.com/ref/#legend--itemWidth.
Harpreet Singh commented
Is this going to support displaying legends in rows/column,wherein user can specify no of columns and then legends will be displayed in tabular format?
This will be particular useful when we have large number of legends.
pls, look on this..............
I'd be grateful if you could handle this problem.