echart柱状图顶部加总数

option = {
"calculable": true,
"color": ["#c23531",
"#ca8622",
"#91c7ae",
"#546570",
"#f00000"
],
"legend": {
"data": ["大(1)型",
"大(2)型",
"中型",
"小(1)型",
"小(2)型"]
},
"series": [{
"data": [0,
0,
1,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
1,
0],
"name": "大(1)型",
"stack": "水库数",
"type": "bar"
},
{
"data": [3,
0,
1,
1,
9,
0,
4,
3,
2,
11,
3,
7,
0,
2,
0],
"name": "大(2)型",
"stack": "水库数",
"type": "bar"
},
{
"data": [6,
2,
16,
22,
58,
0,
25,
15,
6,
37,
20,
21,
5,
2,
2],
"name": "中型",
"stack": "水库数",
"type": "bar"
},
{
"data": [0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0],
"itemStyle": {
"normal": {
"label": {
"show": false
}
}
},
"name": "小(1)型",
"stack": "水库数",
"type": "bar"
},
{
"data": [0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0],
markPoint : {
data : [
{name : '总数', value : 9, xAxis: 0, yAxis: 9},
{name : '总数', value : 2, xAxis: 1, yAxis: 2},
{name : '总数', value : 18, xAxis: 2, yAxis: 18},
{name : '总数', value : 23, xAxis: 3, yAxis: 23},
{name : '总数', value : 67, xAxis: 4, yAxis: 67},
{name : '总数', value : 0, xAxis: 5, yAxis: 0},
{name : '总数', value : 29, xAxis: 6, yAxis: 29},
{name : '总数', value : 18, xAxis: 7, yAxis: 18},
{name : '总数', value : 8, xAxis: 8, yAxis: 8},
{name : '总数', value : 49, xAxis: 9, yAxis: 49},
{name : '总数', value : 23, xAxis: 10, yAxis: 23},
{name : '总数', value : 28, xAxis: 11, yAxis: 28},
{name : '总数', value : 5, xAxis: 12, yAxis: 5},
{name : '总数', value : 5, xAxis: 13, yAxis: 5},
{name : '总数', value : 2, xAxis: 14, yAxis: 2}
]
},
"name": "小(2)型",
"stack": "水库数",
"type": "bar"
}],
"title": {
"left": 10,
"subtext": "水库总数:286",
"subtextStyle": {
"color": "#333333ed",
"fontSize": 14
},
"text": "已设置巡查路线水库统计图",
"textStyle": {
"color": "#333333ed",
"fontSize": 15
}
},
"toolbox": {
"feature": {
"mark": {
"lineStyle": {
"color": "#1e90ff",
"type": "dashed",
"width": 2
},
"show": true,
"title": {
"markUndo": "删除辅助线",
"markClear": "清空辅助线",
"mark": "辅助线开关"
}
},
"dataView": {
"lang": ["数据视图",
"关闭",
"刷新"],
"readOnly": true,
"show": true,
"title": "数据视图"
},
"magicType": {
"show": true,
"title": {
"bar": "柱形图切换",
"stack": "堆积",
"tiled": "平铺",
"line": "折线图切换"
},
"type": ["line",
"bar"]
},
"restore": {
"show": true,
"title": "还原"
},
"saveAsImage": {
"lang": ["点击保存"],
"show": true,
"title": "保存为图片",
"type": "png"
}
},
"show": true
},
"tooltip": {
"axisPointer": {
"type": "shadow"
},
"trigger": "axis"
},
"xAxis": [{
"data": ["武汉市",
"黄石市",
"十堰市",
"宜昌市",
"襄阳市",
"鄂州市",
"荆门市",
"孝感市",
"荆州市",
"黄冈市",
"咸宁市",
"随州市",
"恩施州",
"省直管",
"天门市"],
"type": "category"
}],
"yAxis": [{
"type": "value"
}]
}

你可能感兴趣的:(echart柱状图顶部加总数)