NVD3 Set Expanded as default

妖精的绣舞 提交于 2019-12-10 02:49:03

问题


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'?


回答1:


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.



来源:https://stackoverflow.com/questions/21039390/nvd3-set-expanded-as-default

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!