NVD3 Set Expanded as default
Asked Answered
M

1

9

In NVD3 you can have charts such as the one at : http://nvd3.org/ghpages/stackedArea.html

The default view when you open it up is 'Stacked'. Is it possible to have the default view set as 'Expanded'?

Motif answered 10/1, 2014 at 8:32 Comment(0)
M
9

If you are using the latest version of NVD3 try using chart.style('expand'); to set Expanded as you default view.

Here is the full list of options available - 'stack', 'stream', 'stream-center', 'expand', 'stack_percent'

Source for the list. I have only tested 'expand' for now, so I am hoping the rest would also work as it should :)

Hope it helps.

Massimo answered 10/1, 2014 at 10:14 Comment(4)
Are there any docs on this or did you find it from the source? It works great thank you very muchMotif
From the source, there isn't any docs for NVD3 yet, as far as I know. Once you get the hang of how NVD3, it gets easy to look at the source.Massimo
Thanks for the link! I'm digging in now, but getting chart.style and chart.offset` are not functions errorsPigskin
@Massimo hi would you mind taking a look here? I'm having the same problem as Akshat, however the answer you posted did not work #32873750Pigskin

© 2022 - 2024 — McMap. All rights reserved.