次のコードを使用して、nvd3 の離散棒グラフの y 軸にラベルを設定していますが、y 軸のラベルが表示されません。ところで、x 軸のラベルは正常に機能します。
chart.yAxis.axisLabel('Students (in %)');
次のコードを使用して、nvd3 の離散棒グラフの y 軸にラベルを設定していますが、y 軸のラベルが表示されません。ところで、x 軸のラベルは正常に機能します。
chart.yAxis.axisLabel('Students (in %)');
以下の作品:
nv.addGraph(function() {
var chart = nv.models.discreteBarChart()
.x(function(d) { return d.label })
.y(function(d) { return d.value })
.staggerLabels(true)
.tooltips(false)
.showValues(true)
chart.yAxis.axisLabel("Students (in %)")
d3.select('#chart svg')
.datum(data)
.transition().duration(500)
.call(chart);
nv.utils.windowResize(chart.update);
return chart;
});
どこかにタイプミスがあるかもしれません。