【问题标题】:Rotate Labels nvd3 line chart旋转标签 nvd3 折线图
【发布时间】:2016-11-22 08:22:06
【问题描述】:

我想将 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>

【问题讨论】:

    标签: javascript angularjs d3.js svg nvd3.js


    【解决方案1】:

    您必须使用 '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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-04-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-05-07
      相关资源
      最近更新 更多