javascript - Show all labels in line graph nvd3.js? -


i work nvd3.js show line graph in dashboard. problem cause graph takes small place, not labels showed example : want days of week showed in xaxis, in graph monday, wednesday , friday. when graph takes width of page days showed use graph in dashboard , takes small place.. tried use

 chart.xaxis     //chart x-axis settings                    .axislabeldistance(0) 

but no results. help??

to show labels in line chart have set tick values of xaxis same forcex numbers:

chart.xaxis.tickvalues([1, 2, 3, 4, 5, 6, 7]); 

these numbers above representing days of week, replace them real values used days of week.

if not solve problem completely, can force them on chart too:

chart.forcex([1, 2, 3, 4, 5, 6, 7]); 

Comments