我是D3.js和angular-charis.js的新手
我的数据
$scope.data1 = { series: ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'], data: [{x:'Jan',y:[12150]},{x:'Feb',y:[0]},{x:'Mar',y:[10]},{x:'Apr',y:[64]},{x:'May',y:[2381]},{x:'Jun',y:[578]},{x:'Jul',y:[312]},{x:'Aug',y:[0]},{x:'Sep',y:[8700]},{x:'Oct',y:[17540]},{x:'Nov',y:[20190]},{x:'Dec',y:[1467]}] };
$scope.config = {
title: '',
tooltips: true,
labels: false,
mouseover: function() {},
mouseout: function() {},
click: function() {},
legend: {
display: true,
//could be 'left, right'
position: 'right'
}
};
HTML
<div id="chart1" ac-chart="'bar'" ac-data="data1" ac-config="config1" class="grpah-section"></div>
我的结果显示得很明智:
但是,我希望结果显示每个单独的X轴条显示根据月份指示颜色的颜色