0
- 我使用angularjs nvd3多梳圖表
圖表x軸刻度不顯示如下圖所示。 angularjs nvd3多梳圖表x軸刻度不顯示
我想告訴所有的X軸形成打勾%Y /%M /%d%H:%M
這是我的代碼。
this.$scope.options = {
chart: {
type: 'multiBarChart',
height: 450,
margin : {
top: 20,
right: 20,
bottom: 60,
left: 65
},
x: function(d){ return d[0]; },
y: function(d){ return d[1]; },
color: d3.scale.category10().range(),
duration: 300,
stacked: true,
clipEdge: true,
clipVoronoi: false,
xAxis: {
axisLabel: 'Time',
tickFormat: function(d) {
let formedDate = d3.time.format('%Y/%m/%d %H:%M')(new Date(d));
return formedDate
},
showMaxMin: false,
staggerLabels: true
},
yAxis: {
axisLabel: 'Data',
axisLabelDistance: -20,
tickFormat: function(d){
return d3.format()(d);
}
}
}
};
請幫幫我。