繁体   English   中英

旋转标签nvd3折线图

[英]Rotate Labels nvd3 line chart

我想将x轴标签旋转到90度,因为它们彼此重叠。 我已经使用了rotateLabels,但是它不起作用

<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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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