【发布时间】:2016-11-18 08:39:09
【问题描述】:
html文件
<zingchart id="timesheet-bar-chart" zc-json="myObj"></zingchart>
在 controller.js 中
$scope.myObj = {
"type": "bar",
"utc": true,
"plotarea":{
"margin":'dynamic'
},
"plot":{
"stacked":true,
"stack-type":"normal" /* Optional specification */
},
"scaleX":{
"transform":{
"type":"date",
"all":"%d %M",
"item": {
"visible":false
}
},
},
"series":[{
"values": $scope.barValues,
"backgroundColor":"#f15662"
}]
};
zingchart.render({
id : 'timesheet-bar-chart',
height: 400,
width: "100%"
});
$scope.barValues 中的数据以以下格式动态添加
[[[1478025000000,10],[1477938600000,20],[1478889000000,30]]]
【问题讨论】:
-
“非格式”对您意味着什么?绘制的数据?酒吧尺寸?刻度标签?请提供更多详细信息,因为我无法告诉您要修复什么。
-
条形尺寸和 x 轴刻度标签。
标签: angularjs charts zingchart