Mike Bostock (https://bl.ocks.org/mbostock/7555321)의 라벨 감싸기 기능을 내 nvd3 그래프에 추가하는 방법은 무엇입니까? "세부 사항, 환경 설정을 얻기 위해 전화를 걸어 차를 제안한다"와 같은NVD3 그래프에 라벨 감싸기 기능을 추가하는 방법은 무엇입니까?
createChart(graph_data, tickValue){
if (graph_data) {
var chart;
nv.addGraph(function() {
var chart = nv.models.multiBarChart()
.reduceXTicks(false) //If 'false', every single x-axis tick label will be rendered.
.rotateLabels(-45) //Angle to rotate x-axis labels.
.showControls(true) //Allow user to switch between 'Grouped' and 'Stacked' mode.
.groupSpacing(0.15) //Distance between each group of bars.
;
chart.xAxis
.tickFormat(function (i) {
return tickValue[i];
});
chart.yAxis
.tickFormat(d3.format(',.1f'));
d3.select('#chart1')
.datum(graph_data)
.call(chart);
return chart;
});
} else {
return <div/>
}
}
tickValue[i]
반환 문자열.
내 그래프에 맞도록이 문자열을 감쌀 필요가 있습니다.
랩 기능 (https://bl.ocks.org/mbostock/7555321)을 사용해 보았지만 d3이 아니고 nvd3이 아니기 때문에 할 수 없습니다.
감사합니다.