我想将 x 轴标签旋转 90 度,因为它们彼此重叠。我已经使用了rotateLabels,但它不是wotking
<nvd3-line-chart
data="singleLineChartData"
id="singleLineChart"
width="800"
height="200"
showXAxis="true"
showYAxis="true"
tooltips="true"
interactive="true"
rotateLabels="90"
useinteractiveguideline="true"
xAxisTickValues="xAxisTickValuesFunction()"
xAxisTickFormat="xAxisTickFormat()"
color="colorFunction()"
isArea="false"
margin="{left:50,top:50,bottom:50,right:50}"
showLegend="true"
legendColor="colorFunction()"
noData="No Data!">
<svg></svg>
</nvd3-line-chart>
最佳答案
您必须使用'xaxisrotatelabels'
而不是rotateLabels
<div ng-app='nvd3TestApp'>
<div ng-controller="ExampleCtrl">
<nvd3-line-chart
data="exampleData"
showXAxis="true"
showYAxis="true"
tooltips="true"
xaxisrotatelabels ="90"
interactive="true">
</nvd3-line-chart>
</div>
</div>
工作中Application
关于javascript - 旋转标签 nvd3 折线图,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38458533/