Reputation: 12931
I have a pie chart generated by nvd3, but it has too many slices.
By clicking legend, we can control the slice display or not, I want top 10 (by count) of the chart slices show by default, and others hide (by clicking legend, they can be added to pie chart).
Can I do this in nvd3?
Upvotes: 0
Views: 415
Reputation: 12931
Finally, I complete this by transforming my data:
[{
'x': 10,
'y': 1,
'disabled': true,
}]
set the disabled attribute to true
.
Upvotes: 1