Scrolling legends are just one of the many interactive legend features supported in ZingChart. To enable legend scrolling, you need to specify:
the maximum number of legend items shown with the maxItems
attribute
set the legend overflow
attribute to 'scroll'
.
legend: {
maxItems: 8,
overflow: 'scroll'
}
You can style the scroll bar and handle by creating a scroll
object and using the bar
and scroll
objects.
legend: {
maxItems: 8,
overflow: 'scroll',
scroll: {
bar: {
//applicable styling attributes
},
handle: {
//applicable styling attributes
}
}
}