Toggle navigation
**省年度用药情况整体统计
By
N***u
2019-01-14 08:42:44
脚本
16
21
作品使用的第三方脚本
数据管理
上传数据
支持小于 5M 任意格式(csv, xlsx, json, xml, ...)的数据文件
上传后可以通过生成的文件链接异步获取托管的数据。
历史数据
0 条
无历史数据
代码修改记录
信息提示
保存作品
对当前截图不满意?你还可以
上传本地截图
重新截图
作品名称
作品描述
标签
geo
grid
legend
markLine
markPoint
bar
effectScatter
line
lines
map
timeline
title
toolbox
tooltip
visualMap
作品默认版本
最新
16
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
20:11:45
图表已生成
整理代码
刷新
代码
var cost = [0.2, 0.201, 1]//本期比上期(大于1按1处理) var dataCost = [1000.01,200000,200]//真是的金额 var totalCost = [1, 1, 1]//比例综合 var visits = [92, 102, 89]//本期占总的百分比*100 var grade = ['人次用药金额', '药品使用量', '用药金额'] var data = { title: "**省", grade: grade, cost: cost, totalCost: totalCost, visits: visits, dataCost:dataCost }; option = { backgroundColor: '#05274C', title: { top: '5%', left: 'center', text: data.title + '年度用药情况整体统计', textStyle: { align: 'center', color: '#4DCEF8', fontSize: 18 } }, grid: { left: '240', right: '100' }, xAxis: { show: false, }, yAxis: { type: 'category', axisLabel: { margin: 100, show: true, color: '#4DCEF8', fontSize: 14 }, axisTick: { show: false, }, axisLine: { show: false, }, data: data.grade }, series: [{ type: 'bar', barGap: '-100%', label: { normal: { show: true, position: 'right', color: '#fff', fontSize: 14, formatter: function(param) { return '同比:'+data.visits[param.dataIndex] +'%'; }, } }, barWidth: '35%', itemStyle: { normal: { borderColor: '#4DCEF8', borderWidth: 2, barBorderRadius: 15, color: 'rgba(102, 102, 102,0)' }, }, z: 1, data: data.totalCost, // data: da }, { type: 'bar', barGap: '-98%', barWidth: '33%', itemStyle: { normal: { barBorderRadius: 16, color: { type: 'linear', x: 0, x1: 1, colorStops: [{ offset: 0, color: '#02ddff' }, { offset: 1, color: '#00feff' }] } }, }, max: 1, label: { normal: { show: true, position: 'left', color: '#fff', fontSize: 14, formatter: function(param) { if(param.dataIndex=='0'){ return data.dataCost[param.dataIndex] + '元'; } if(param.dataIndex=='1'){ return data.dataCost[param.dataIndex]; } if(param.dataIndex=='2'){ return data.dataCost[param.dataIndex] + '万'; } }, } }, labelLine: { show: true, }, z: 2, data: data.cost, }] }