-
Notifications
You must be signed in to change notification settings - Fork 2.1k
nv.models.legend
Josh Kadis edited this page May 5, 2016
·
5 revisions
A legend consisting of legend labels presented alongside a colored bullet. The bullets have some standard behaviours:
- bullets are selectable, when nothing is selected, will automatically select all
- double-clicking a bullet, will turn all the others off
- optionally act as a radio button (only one selected)
Assumes data of the form:
[ { key: '....' } ]
Attach listener using
chart.legend.dispatch.on('legendClick', function(series, index) {
// series properties are color, disabled, key, seriesIndex, values
// index === series.seriesIndex
});