NVD3 chart partly missing grid lines

旧城冷巷雨未停 提交于 2020-01-15 19:18:50

问题


In my chart here, if you can notice, it is missing grid lines for the first 4 and last 4 dates.

I tried doing:

.ticks(data[0].length)

but it didnt help.

What am I missing?

jsFiddle


回答1:


Adding .showMaxMin(false) fixes the problem.

      chart.xAxis
       .showMaxMin(false)
       .axisLabel("My X-Axis")
       .tickFormat(function(d) { return d3.time.format('%x')(new Date(d)) });

Working example is here



来源:https://stackoverflow.com/questions/24523744/nvd3-chart-partly-missing-grid-lines

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