Toggle navigation
Awesome Chart
By
哭***人
2020-09-17 09:47:08
脚本
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
图表已生成
整理代码
刷新
代码
//EUI.include("vfs/root/echarts/echarts2.js"); //var chartData =<#=GRID22.B1$#>; //var chartName =<#=GRID22.A1$#>; var chartName = ['数学学院', '物理学院', '化学学院', '生命科学学院', '工学院', '材料科学与工程学院', '生物医学工程学院']; var chartData = ['132', '110', '100', '100', '90', '90', '70']; var attackSourcesColor = [{ x: 0, y: 0, x2: 1, y2: 0, colorStops: [{ offset: 0, color: '#FF7E7C' // 0% 处的颜色 }, { offset: 1, color: '#FF6061' // 100% 处的颜色 }], }, { x: 0, y: 0, x2: 1, y2: 0, colorStops: [{ offset: 0, color: '#F9C270' // 0% 处的颜色 }, { offset: 1, color: '#F9A146' // 100% 处的颜色 }], }, { x: 0, y: 0, x2: 1, y2: 2, colorStops: [{ offset: 0, color: '#F9C270' // 0% 处的颜色 }, { offset: 1, color: '#F9A146' // 100% 处的颜色 }], }, { x: 0, y: 0, x2: 1, y2: 0, colorStops: [{ offset: 0, color: '#5CC0FF' // 0% 处的颜色 }, { offset: 1, color: '#5998FF' // 100% 处的颜色 }], }] var option = { grid: { left: '2%', right: '10%', bottom: '2%', top: '2%', containLabel: true }, xAxis: [{ show: false, }, { show: false, } ], yAxis: { type: 'category', inverse: true, show: false }, series: [ //亮色条 百分比 { show: true, type: 'bar', barGap: '-100%', barWidth: '20%', z: 2, // itemStyle: { // normal: { // barBorderRadius:10, // color: new echarts2.graphic.LinearGradient(0, 0, 0, 1, [{ // offset: 0, // color: '#5998FF' // 0% 处的颜色 // }, { // offset: 1, // color: '#5CC0FF' // 100% 处的颜色 // }], false) // } // }, itemStyle: { normal: { color: function(params) { return attackSourcesColor[params.dataIndex > 3 ? 3 : params.dataIndex] }, barBorderRadius: 5, } }, label: { normal: { show: true, textStyle: { color: '#000', fontSize: 14, }, position: 'right', formatter: function(data) { return (chartData[data.dataIndex]).toFixed(0); } } }, data: chartData, }, //年份 { show: true, type: 'bar', xAxisIndex: 1, //代表使用第二个X轴刻度 barGap: '-100%', barWidth: '20%', itemStyle: { normal: { barBorderRadius: 200, color: 'transparent' } }, label: { normal: { show: true, position: [0, '-23'], textStyle: { fontSize: 14, color: '#333', }, formatter: function(data) { return chartName[data.dataIndex]; } } }, data: chartData } ] }; //chartName[if(params.name='',0,params.name)] //myChart.on('click', function (params) { // _zcalcn([['Widget1',"HHH160",'@cs='+chartName[params.name ='' ? '0' : params.name]+'']]); // _zcalcn([['Widget1',"HHH160",'@cs='+chartName[params.name =1|2|3|4|5|6 ? params.name : 0]+'']]); // }); //return option;