问题
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