【发布时间】:2018-08-13 08:41:17
【问题描述】:
我正在使用 AngularJS、Blur Admin UI 和 D3 图表。在这些帮助下,我创建了 PIE、BAR 和 ROW 图表。
我在条形图 x 轴中有很多数据,并且一个 x 轴标签与其他标签重叠。现在,我试图将 x 轴标签显示为垂直。 但我没有得到解决方案。
HTML
<div class="col-lg-6 col-md-6" ba-panel
ba-panel-title="BAR Chart" ba-panel-class="with-scroll">
<div id="state-donations" class=" "></div>
</div>
Controller.JS
BarTypeChart
.width(450)
.height(300)
.colors(barChartColors)
.dimension(geoType)
.group(typeOfGeo)
.margins({top: 10, right: 50, bottom: 30, left: 50})
.centerBar(false)
.gap(10)
.elasticY(true)
.x(d3.scale.ordinal().domain(geoType))
.xUnits(dc.units.ordinal)
.renderHorizontalGridLines(true)
.renderVerticalGridLines(true)
.ordering(function(d){return d.value;})
.yAxis().tickFormat(d3.format("s"));
谁能帮忙解决这个问题?
【问题讨论】: