简体   繁体   中英

How to make the NVD3 discreteBarChart labels on the X axis to adapt to the width or to the number of labels?

I'm currently using a the NVD3 discreteBarChart but I have a lot of data and the labels on the X axis, which are dates in my application, are encroaching upon each other like this : 图片如下 ). This doesn't happen with a multiBar or a linePlusBar chart, where the labels are automatically adapted : 在此输入图像描述

How can I prevent the lablels on the discreteBar chart to impinge on the others?

Thanks for your answers!

回答得很晚,但是为了得到类似的结果,但是使用Lars提到的多条形图,您可以使用以下命令来获得类似的图形(即隐藏“堆叠”和“分组”,以及图例按钮)。

n1$chart(showControls = FALSE, showLegend = FALSE)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM