Reusable
Reusable

Reputation: 1948

NVD3 Multibar default preselect certain bars

Im currently using NVD3 JS library to plot a multibar chart. I wish to "preselect" certain bar values, so it will only display certain bars by default. Following chart shows what i want to achieve: enter image description here Where:

"Data 3 " is by default **not** selected
"Data 0 " is by default selected
"Data 1 " is by default selected
"Data 2 " is by default selected

I have the above sample created in Fiddle (As per @shabeer90 suggested below): http://jsfiddle.net/gxc27jav/3/

Upvotes: 0

Views: 70

Answers (1)

liquidpele
liquidpele

Reputation: 76

You should be able to add a "disabled" attribute to the series object for the series you want to be disabled... example:

[{disabled: true, values: [...]}, {values: [...]}]

Upvotes: 1

Related Questions