设为首页 加入收藏

TOP

Echart--百度地图(散点图)(二)
2019-09-03 01:00:11 】 浏览:56
Tags:Echart-- 百度 地图
try.fill", 76 "stylers": { 77 "color": "#00508b" 78 } 79 }, 80 { 81 "featureType": "poi",  //定位 82 "elementType": "all", 83 "stylers": { 84 "visibility": "off" 85 } 86 }, 87 { 88 "featureType": "green",  //绿地 89 "elementType": "all", 90 "stylers": { 91 "color": "#056197", 92 "visibility": "off" 93 } 94 }, 95 { 96 "featureType": "subway",  //地铁 97 "elementType": "all", 98 "stylers": { 99 "visibility": "off" 100 } 101 }, 102 { 103 "featureType": "manmade",//人造区域 104 "elementType": "all", 105 "stylers": { 106 "visibility": "off" 107 } 108 }, 109 { 110 "featureType": "local",//普通道路 111 "elementType": "all", 112 "stylers": { 113 "visibility": "off" 114 } 115 }, 116 { 117 "featureType": "arterial", 118 "elementType": "labels", 119 "stylers": { 120 "visibility": "off" 121 } 122 }, 123 { 124 "featureType": "boundary", 125 "elementType": "geometry.fill", 126 "stylers": { 127 "color": "#029fd4" 128 } 129 }, 130 { 131 "featureType": "building",  //建筑物 132 "elementType": "all", 133 "stylers": { 134 "color": "#1a5787" 135 } 136 }, 137 { 138 "featureType": "label",//标签 139 "elementType": "all", 140 "stylers": { 141 "visibility": "off" 142 } 143 } 144 ] 145 } 146 }, 147 series: [{  //展示数据的分类系列 148 name: '校友分布',  //名称 149 type: 'scatter',  //类型 150 coordinateSystem: 'bmap',  //坐标系,使用上面定义的bmap 151 data: {},  //数据,这里设置空,等请求后台传过来数据之后再赋上 152 symbolSize: function(val) {  //数据显示的符号的大小 153 return val[2];  //直径?半径?长度 154 }, 155 label: {  //标签 156 normal: { 157 formatter: '{b}',  //格式化 158 position: 'right',  标签显示位置 159 show: false    //是否显示 160 }, 161 emphasis: {  //强调 162 show: false 163 } 164 }, 165 itemStyle: {  //样式 166 normal: { 167 color: '#FFD700' 168 } 169 } 170 }, 171 { 172 name: 'Top 5',  //分类系列的第二类 173 type: 'effectScatter', 174 coordinateSystem: 'bmap', 175 data: {}, 176 symbolSize: function(val) { 177 return val[2] / 10; 178 }, 179 showEffectOn: 'emphasis', 180 rippleEffect: {  //连锁反应 181 brushType: 'stroke' 182 }, 183 hoverAnimation: true,  //hover操作 184 label: { 185 normal: { 186 formatter: '{b}', 187 position: 'right', 188 show: true 189 } 190 }, 191 itemStyle: { 192 normal: { 193 color: '#f4e925', 194 shadowBlur: 10, 195 shadowColor: '#333' 196 } 197 }, 198 zlevel: 1  //层级 199 } 200 ] 201 };

 7、修改滑动操作后的显示格式,具体想显示什么样的格式,大家根据返回的数据来写,具体问题具体分析

 1     //官方实例tooltip  
 2     tooltip: {  
 3         trigger: 'item'  
 4     },  
 5 
 6 
 7     //我改后的
 8     tooltip: {
 9         trigger: 'item',
10         //在这里添加一个函数来返回改变原来的格式
11         formatter: function(data) {
12             return data
首页 上一页 1 2 3 下一页 尾页 2/3/3
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇块级元素行内元素以及display属性 下一篇web前端怎么样才能入门

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目