Toggle navigation
如何动态的改变散点的颜色等
By
j***9
2018-04-11 00:51:56
脚本
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
图表已生成
整理代码
刷新
代码
//LL1={'0': ['W', 'Y', 'E', 'B', 'G', 'P'], '1': ['E', 'S', 'Y', 'C'], '2': ['B', 'Z', 'M', 'E', 'P']} //LL2={"a":{"3744":0.59,"3745":-0.67,"3746":3.27,"3747":-0.24,"3748":-5.31,"3749":1.38,"3750":-2.04,"3751":4.04,"3752":-0.14,"3753":2.94},"b":{"3744":-0.1,"3745":0.62,"3746":-3.78,"3747":-3.02,"3748":-3.73,"3749":-2.38,"3750":-2.66,"3751":0.4,"3752":-0.65,"3753":-2.87},"c":{"3744":-0.78,"3745":-1.21,"3746":1.58,"3747":4.87,"3748":0.19,"3749":1.32,"3750":-1.35,"3751":4.17,"3752":-2.83,"3753":-5.46},"d":{"3744":-2.28,"3745":3.19,"3746":-4.56,"3747":-1.25,"3748":-4.76,"3749":2.32,"3750":2.75,"3751":0.46,"3752":1.55,"3753":-5.55},"e":{"3744":2.83,"3745":0.74,"3746":-2.4,"3747":-7.03,"3748":0.18,"3749":0.28,"3750":-1.66,"3751":4.78,"3752":1.58,"3753":3.08},"f":{"3744":-1.81,"3745":-1.58,"3746":-3.86,"3747":2.0,"3748":5.43,"3749":-3.36,"3750":-1.16,"3751":-1.0,"3752":2.01,"3753":-2.08},"g":{"3744":-1.75,"3745":-0.66,"3746":5.93,"3747":2.28,"3748":-4.13,"3749":2.66,"3750":-5.97,"3751":0.26,"3752":4.92,"3753":6.42},"h":{"3744":3.23,"3745":2.72,"3746":-1.64,"3747":-1.57,"3748":-2.45,"3749":2.99,"3750":-1.4,"3751":2.36,"3752":1.79,"3753":-1.36},"i":{"3744":0.55,"3745":2.34,"3746":2.03,"3747":2.38,"3748":2.87,"3749":1.79,"3750":-2.12,"3751":0.01,"3752":2.5,"3753":-3.43},"j":{"3744":2.02,"3745":2.32,"3746":-0.91,"3747":-6.91,"3748":2.86,"3749":3.18,"3750":0.01,"3751":0.22,"3752":-3.45,"3753":0.14},"k":{"3744":-0.97,"3745":-2.06,"3746":-1.52,"3747":-1.14,"3748":-4.75,"3749":-1.81,"3750":0.82,"3751":3.06,"3752":3.45,"3753":-3.12},"l":{"3744":4.02,"3745":0.26,"3746":0.65,"3747":4.93,"3748":2.05,"3749":2.95,"3750":6.73,"3751":4.41,"3752":-4.84,"3753":-0.78},"m":{"3744":-1.02,"3745":-0.69,"3746":2.99,"3747":-2.2,"3748":-1.28,"3749":3.89,"3750":-2.39,"3751":-2.4,"3752":-5.24,"3753":-1.42},"n":{"3744":1.01,"3745":-0.24,"3746":-1.88,"3747":-1.71,"3748":0.37,"3749":1.92,"3750":1.09,"3751":0.09,"3752":-0.77,"3753":-0.03},"o":{"3744":2.2,"3745":3.09,"3746":8.68,"3747":2.65,"3748":0.68,"3749":-3.09,"3750":3.07,"3751":5.34,"3752":-5.82,"3753":-2.29},"p":{"3744":-3.03,"3745":0.47,"3746":-0.62,"3747":2.31,"3748":3.59,"3749":-3.13,"3750":-3.88,"3751":-4.08,"3752":-1.32,"3753":-2.22},"q":{"3744":1.8,"3745":4.1,"3746":4.26,"3747":1.81,"3748":5.65,"3749":0.66,"3750":-1.86,"3751":-2.68,"3752":-1.39,"3753":-3.73},"r":{"3744":1.15,"3745":3.03,"3746":1.94,"3747":0.86,"3748":7.93,"3749":-1.57,"3750":-1.39,"3751":-1.64,"3752":1.76,"3753":-2.16},"s":{"3744":1.92,"3745":-0.61,"3746":10.8,"3747":0.86,"3748":-0.23,"3749":0.04,"3750":-0.03,"3751":2.82,"3752":-2.73,"3753":-0.5},"t":{"3744":-2.87,"3745":-0.18,"3746":-4.34,"3747":-2.87,"3748":-4.0,"3749":-1.36,"3750":2.47,"3751":-7.86,"3752":-4.09,"3753":1.39},"u":{"3744":-1.57,"3745":4.08,"3746":0.44,"3747":-4.38,"3748":0.99,"3749":-6.36,"3750":-2.25,"3751":-1.51,"3752":-3.64,"3753":-3.58},"v":{"3744":1.43,"3745":-1.47,"3746":-2.87,"3747":-2.2,"3748":-0.85,"3749":1.76,"3750":-1.62,"3751":-5.32,"3752":2.07,"3753":5.45},"w":{"3744":-1.31,"3745":-2.31,"3746":-0.99,"3747":0.37,"3748":0.83,"3749":-5.36,"3750":-0.16,"3751":4.79,"3752":-1.19,"3753":3.35},"x":{"3744":-2.62,"3745":-0.06,"3746":-1.96,"3747":3.21,"3748":-3.37,"3749":-4.23,"3750":0.14,"3751":2.56,"3752":0.02,"3753":1.77},"y":{"3744":-2.67,"3745":0.54,"3746":-3.94,"3747":1.14,"3748":0.03,"3749":0.93,"3750":-1.12,"3751":1.38,"3752":3.97,"3753":3.95},"z":{"3744":-1.97,"3745":3.56,"3746":2.83,"3747":-2.25,"3748":-2.22,"3749":2.2,"3750":-1.82,"3751":1.55,"3752":2.82,"3753":3.69}} var data={'counties':['张','白'],'timeline':[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22], 'series':[ [[1,1,"白",1,2],[1,2,"张",1,1]], [[2,1,"白",2,3],[2,2,"张",2,1]], [[3,1,"白",3,1],[3,2,"张",3,3]], [[4,1,"白",4,2],[4,2,"张",4,2]], [[5,1,"白",5,1],[5,2,"张",5,2]], [[6,1,"白",6,1],[6,2,"张",6,1]], [[7,1,"白",7,3],[7,2,"张",7,3]], [[8,1,"白",8,2],[8,2,"张",8,1]], [[9,1,"白",9,3],[9,2,"张",9,3]], ]} option = { grid: { left: 10, bottom: 20, containLabel: true, top: 80 }, xAxis: { }, yAxis: { min:0, max:5, }, series: [] } // option.visualMap = { // show: true, // dimension: 1, // inRange: { // colorLightness: [0.5, 0.9] // } // }; var series = data.series; data.counties.forEach(function (country) { var data = series.map(function (yearData) { var item = yearData.filter(function (item) { return item[2] === country; })[0]; return { label: { normal: { show: true }, }, name: item[3], value: item, }; }); option.series.push({ type: 'graph', coordinateSystem: 'cartesian2d', data: data, symbolSize: function(val){ return val[4]*15 }, animationDelay: function (idx) { return idx * 200; } }); }); myChart.setOption(option); console.log(item)