From 8763cc94bf1f001307fad1bee1379fce4a1da4aa Mon Sep 17 00:00:00 2001 From: liuqimichale <123456lq> Date: Tue, 19 Sep 2017 18:48:59 +0800 Subject: [PATCH] first --- js/pagejs/index.js | 148 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------------------------------------------------------------------ 1 file changed, 58 insertions(+), 90 deletions(-) diff --git a/js/pagejs/index.js b/js/pagejs/index.js index 2cec28b..79a19c9 100644 --- a/js/pagejs/index.js +++ b/js/pagejs/index.js @@ -300,118 +300,86 @@ //中间地图 $.getJSON('./../js/pagejs/handan.json', function (yCjson) { - echarts.registerMap('银川', yCjson); + echarts.registerMap('邯郸', yCjson); var chart = echarts.init(document.getElementById('map_c_echart')); var option = { + tooltip : { + trigger: 'item' + }, + visualMap: { - show: false, - min: 1, - max: 10000, - itemWidth: 0,//图形的宽度,即长条的宽度 - itemHeight: 90,//图形的高度,即长条的高度 - left: 5, - bottom: 0, - //text: ['High', 'Low'], - realtime: false,//拖拽时,是否实时更新 - calculable: false,//是否显示拖拽用的手柄 - inRange: { - color: ['rgba(29,71,193,.3)', 'rgba(33,77,203,.7)','rgba(29,71,193,.2)','rgba(33,77,203,.6)'] - } + min: 0, + max: 2500, + left: 'left', + top: 'bottom', + text:['高','低'], // 文本,默认为数值文本 + calculable : true }, - series:[ + + series : [ { - zoom:1.3,//当前视角的缩放比例。 - name:'犯罪数量', - type:'map', - map:'银川', - mapLocation:{ - y:60 - }, + name: 'iphone3', + type: 'map', + mapType: '邯郸', + roam: false, label: { normal: { - show: true + show: false }, emphasis: { - show: true, + show: true } }, - itemStyle: { + data:[ + {name: '峰峰矿区',value: Math.round(Math.random()*1000)}, + {name: '邯山区',value: Math.round(Math.random()*1000)}, + {name: '复兴区',value: Math.round(Math.random()*1000)}, + {name: '丛台区',value: Math.round(Math.random()*1000)}, + {name: '鸡泽县',value: Math.round(Math.random()*0)}, + ] + }, + { + name: 'iphone4', + type: 'map', + mapType: '邯郸', + label: { normal: { - borderWidth: 1, - borderColor: 'rgba(147,191,245,.3)', - - label: { - show: false, - textStyle: { - color: "#fff" - } - } + show: false }, - emphasis:{ - areaColor: 'rgba(255,204,0,0.4)', - label: { - show: false, - textStyle: { - color: "#fff" - } - } + emphasis: { + show: true } }, - markPoint:{ - symbol:'image://./../img/cf_map_icon.png', - silent:true, - symbolSize:[17, 17], - data: [ - - { - name: '', - coord: [103.729882,30.136356], - }, - { - name: '', - coord: [103.789673,30.268198], - }, - { - name: '', - coord: [103.806921,29.789424], - }, - { - name: '', - coord: [104.164518,30.059866], - }, - { - name: '', - coord: [103.383783,30.04186], - }, - { - name: '', - coord: [103.26535,29.914721], - }, - - ], - label:{ - normal:{ - show:false, - }, - emphasis:{ - show:false, - }, - + data:[ + {name: '峰峰矿区',value: Math.round(Math.random()*1000)}, + {name: '邯山区',value: Math.round(Math.random()*1000)}, + {name: '复兴区',value: Math.round(Math.random()*1000)}, + {name: '丛台区',value: Math.round(Math.random()*1000)}, + ] + }, + { + name: 'iphone5', + type: 'map', + mapType: '邯郸', + label: { + normal: { + show: false + }, + emphasis: { + show: true } }, data:[ - {name:'西夏区',value:Math.round(Math.random()*500)}, - {name:'贺兰县',value:Math.round(Math.random()*500)}, - {name:'金凤区',value:Math.round(Math.random()*500)}, - {name:'永宁县',value:Math.round(Math.random()*500)}, - {name:'灵武市',value:Math.round(Math.random()*500)}, - {name:'兴庆区',value:Math.round(Math.random()*500)} + {name: '峰峰矿区',value: Math.round(Math.random()*1000)}, + {name: '邯山区',value: Math.round(Math.random()*1000)}, + {name: '复兴区',value: Math.round(Math.random()*1000)}, + {name: '丛台区',value: Math.round(Math.random()*1000)}, + ] } - ], - + ] }; chart.setOption(option); }); -- libgit2 0.21.4