Toggle navigation
glassmap
By
i***a
2019-03-07 17:29:57
脚本
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 xAxisPanelQty =3; //xAxis panel qty var yAxisPanelQty =6; //yAxis panel qty var QpanelSplitX = 6; //panel split xAxis qty var QpanelSplitY = 6; //panel split yAxis qty var glassWidth = 2200; var glassHeight = 2500; var leftposition = 10; var topposition = 10; var rightposition = 4; var buttomposition = 6; var visualMapMinValue = 0; var visualMapMaxValue = 100; var panelshow = true; //panel grid show var grids = []; var xAxes = []; var yAxes = []; var series = []; var titles = []; var xAxisIndexByZoom = []; //设置Zoom操作时关联的X坐标系 var yAxisIndexByZoom = []; //设置Zoom操作时关联的Y坐标系 var dataRect = [ [1, 2, 2, 1], [7, 5, 8, 4], [9,10,10, 9], [10,11,11,10] ]; // var colorRectEmphasis = { // type: 'linear', // x: 0, // y: 0, // x2: 1, // y2: 1, // colorStops: [{ // offset: 0, color: 'black' // 0% 处的颜色 // }, { // offset: 0.5, color: 'red' // 50% 处的颜色 // }, { // offset: 1, color: 'blue' // 100% 处的颜色 // }] // }; // var colorRect = { // type: 'radial', // x: 0.5, // y: 0.5, // r: 0.5, // colorStops: [{ // offset: 0, color: 'red' // 0% 处的颜色 // }, { // // offset: 0.5, color: 'red' // 50% 处的颜色 // // }, { // offset: 1, color: 'blue' // 100% 处的颜色 // }] // }; var colorRect = 'rgba(255,0,0,0.3)'; dataRect = echarts.util.map(dataRect, function (item) { return { value: [item[0]*glassWidth/xAxisPanelQty/QpanelSplitX,item[1]*glassHeight/yAxisPanelQty/QpanelSplitY,item[2]*glassWidth/xAxisPanelQty/QpanelSplitX,item[3]*glassHeight/yAxisPanelQty/QpanelSplitY], itemStyle: { color: colorRect }, // emphasis :{ // itemStyle: { // color: colorRectEmphasis // } // } }; }); var data = []; var random = function (max) { return (Math.random() * max).toFixed(3); }; // random data for (var i = 0; i < 50; i++) { data.push([random(glassWidth), random(glassHeight), random(visualMapMaxValue)]); } titles.push({ text: "Product GlassMap (Width:"+glassWidth+"mm,Height:"+glassHeight+"mm)", left: 'center', textAlign:'left' }); //第个Panel 再进行分割 var qpanelXAxisCoordData =[]; for(m=0;m
"+"end["+params.value[2]+","+params.value[1]+"]"; } return params.name + ' position: ['+params.value[0]+','+params.value[1]+']'+'
value:'+(params.value[2]); } }, visualMap: { type: 'continuous', min: visualMapMinValue, top: 0, orient:'vertical', max: visualMapMaxValue, text:['High','Low'], realtime: false, calculable : true, color: ['orangered','yellow','blue'], seriesIndex : 0 }, dataZoom: [ { id: 'dataZoomX', type: 'slider', xAxisIndex: xAxisIndexByZoom, filterMode: 'filter', showDataShadow: false, height: 10, handleIcon: 'M10.7,11.9H9.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z', // jshint ignore:line handleSize: 20, handleStyle: { shadowBlur: 6, shadowOffsetX: 1, shadowOffsetY: 2, shadowColor: '#aaa' }, borderColor: 'transparent', backgroundColor: '#e2e2e2', }, { id: 'dataZoomY', type: 'slider', yAxisIndex: yAxisIndexByZoom, filterMode: 'filter', showDataShadow: false, width:10, handleIcon: 'M10.7,11.9H9.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z', // jshint ignore:line handleSize: 20, handleStyle: { shadowBlur: 6, shadowOffsetX: 1, shadowOffsetY: 2, shadowColor: '#aaa' }, borderColor: 'transparent', backgroundColor: '#e2e2e2', }, { id: 'dataZoomXinside', type: 'inside', xAxisIndex: xAxisIndexByZoom, filterMode: 'filter' }, { id: 'dataZoomYinside', type: 'inside', yAxisIndex: yAxisIndexByZoom, filterMode: 'filter' } ], };