Toggle navigation
series 清空后有残影
By
b***i
2020-07-31 10:22:31
脚本
16
21
作品使用的第三方脚本
/dep/echarts/latest/extension/bmap.min.js,https://api.map.baidu.com/api?v=2.0&ak=KOmVjPVUAey1G2E8zNhPiuQ6QiEmAwZu&__ec_v__=20190126
数据管理
上传数据
支持小于 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
图表已生成
整理代码
刷新
代码
option = { bmap: { center: [106.631881, 26.642758], zoom: 11, resizeEnable: true, roam: true, mapStyle: { 'styleJson': [{ 'featureType': 'water', 'elementType': 'all', 'stylers': { 'color': '#031628' } }, { 'featureType': 'land', 'elementType': 'geometry', 'stylers': { 'color': '#000102' } }, { 'featureType': 'highway', 'elementType': 'all', 'stylers': { 'visibility': 'off' } }, { 'featureType': 'arterial', 'elementType': 'geometry.fill', 'stylers': { 'color': '#000000' } }, { 'featureType': 'arterial', 'elementType': 'geometry.stroke', 'stylers': { 'color': '#0b3d51' } }, { 'featureType': 'local', 'elementType': 'geometry', 'stylers': { 'color': '#000000' } }, { 'featureType': 'railway', 'elementType': 'geometry.fill', 'stylers': { 'color': '#000000' } }, { 'featureType': 'railway', 'elementType': 'geometry.stroke', 'stylers': { 'color': '#08304b' } }, { 'featureType': 'subway', 'elementType': 'geometry', 'stylers': { 'lightness': -70 } }, { 'featureType': 'building', 'elementType': 'geometry.fill', 'stylers': { 'color': '#000000' } }, { 'featureType': 'all', 'elementType': 'labels.text.fill', 'stylers': { 'color': '#857f7f' } }, { 'featureType': 'all', 'elementType': 'labels.text.stroke', 'stylers': { 'color': '#000000' } }, { 'featureType': 'building', 'elementType': 'geometry', 'stylers': { 'color': '#022338' } }, { 'featureType': 'green', 'elementType': 'geometry', 'stylers': { 'color': '#062032' } }, { 'featureType': 'boundary', 'elementType': 'all', 'stylers': { 'color': '#465b6c' } }, { 'featureType': 'manmade', 'elementType': 'all', 'stylers': { 'color': '#022338' } }, { 'featureType': 'label', 'elementType': 'all', 'stylers': { 'visibility': 'off' } } ] } }, series: [{ name: 'POINT', type: 'effectScatter', coordinateSystem: 'bmap', rippleEffect: { brushType: 'stroke', period: 4, scale: 4 }, label: { show: false, position: 'right', formatter: '{b}' }, itemStyle: { color: '#3ed4ff' }, data: [{ kind: 'POINT', name: '乌当区', value: [106.821057, 26.669621, 1058] }, { kind: 'POINT', name: '贵阳市', value: [106.703183, 26.781471, 2140] }, { kind: 'POINT', name: '观山湖区', value: [106.549319, 26.659037, 2822] }, { kind: 'POINT', name: '云岩区', value: [106.724528, 26.604744, 4699] }, { kind: 'POINT', name: '南明区', value: [106.774703, 26.541612, 4886] }, { kind: 'POINT', name: '修文县', value: [106.591841, 26.838995, 820] }, { kind: 'POINT', name: '白云区', value: [106.678219, 26.727732, 1721] } ], tooltip: { show: true } }, { name: 'POINT2', type: 'effectScatter', coordinateSystem: 'bmap', rippleEffect: { brushType: 'stroke', period: 4, scale: 4 }, label: { show: false, position: 'right', formatter: '{b}' }, itemStyle: { color: '#ffa022' }, data: [{ kind: 'POINT2', name: 'AAA', value: [106.800718, 26.633137, 1058] }, { kind: 'POINT2', name: 'BBB', value: [106.597621, 26.719608, 2140] }, { kind: 'POINT2', name: 'CCC', value: [106.561509, 26.784871, 15460] } ] }, { name: 'AAA', type: 'lines', coordinateSystem: 'bmap', animation: false, effect: { show: true, period: 4, trailLength: 0.02, symbol: 'arrow', symbolSize: 6, color: '#3ed4ff' }, lineStyle: { color: '#3ed4ff', width: 1, opacity: 1, curveness: 0.3 }, data: [{ coords: [ [106.821057, 26.669621], [106.800718, 26.633137] ] }] }, { name: 'BBB', type: 'lines', coordinateSystem: 'bmap', animation: false, effect: { show: true, period: 4, trailLength: 0.02, symbol: 'arrow', symbolSize: 6, color: '#ffa022' }, lineStyle: { color: '#ffa022', width: 1, opacity: 1, curveness: 0.3 }, data: [{ coords: [ [106.703183, 26.781471], [106.597621, 26.719608] ] }] }, { name: 'CCC', type: 'lines', coordinateSystem: 'bmap', animation: false, effect: { show: true, period: 4, trailLength: 0.02, symbol: 'arrow', symbolSize: 6, color: '#a6c84c' }, lineStyle: { color: '#a6c84c', width: 1, opacity: 1, curveness: 0.3 }, data: [{ coords: [ [106.549319, 26.659037], [106.561509, 26.784871] ] }, { coords: [ [106.724528, 26.604744], [106.561509, 26.784871] ] }, { coords: [ [106.774703, 26.541612], [106.561509, 26.784871] ] }, { coords: [ [106.703183, 26.781471], [106.561509, 26.784871] ] }, { coords: [ [106.591841, 26.838995], [106.561509, 26.784871] ] }, { coords: [ [106.678219, 26.727732], [106.561509, 26.784871] ] } ] } ] } setTimeout(function() { alert('开始清空series aaa'); const opts = echarts.util.clone(option) opts.series = [] myChart.setOption(opts); }, 5000); setTimeout(function() { alert('开始清空series bbb'); const opts = echarts.util.clone(option) opts.series = [] myChart.setOption(opts, true); }, 10000);