Echart地图带有时间轴的打点图和热力图

Echarts带有时间轴的打点图和热力图型地图

option ={
      baseOption: {
          timeline: {   // 时间轴样式
            axisType: 'category',
            data: yearArray,
            playInterval: 1000,
            bottom: '0',
            symbolSize: 10,
            autoPlay: false,
            loop: true,
            realtime: true,
            lineStyle: {
              color: '#466872',
              width: 2,
            },
            label: {
              color: '#5cc5da',
              fontSize: 14,
            },
          },
          title: {
            text: '产量(辆)',
            right: '8.5%',
            bottom: '15%',
            textStyle: {
              color: '#fff',
              fontSize: '17',
            },
          },
          grid: {    //echarts地图距离容器位置
            left: '14%',
            right: '2%',
            bottom: '70%',
            top: '2%',
            containLabel: false,
          },
          visualMap: {
            seriesIndex: 1, //选取series里面第二个数值是地图的图例样式
            right: '5%',
            bottom: '10%',
            itemWidth: '12',
            itemHeight: '110',
            calculable: true,
            orient: 'horizontal',
            inRange: {
              color: ['#efefef', '#00abfb', '#0090f9', '#007dfb'],
            },
            textStyle: {
              color: '#fff',
            },

          },
          geo: {
            map: 'china',   //设置地图属于哪个地点,根据插件china.json设置
            label: {
              normal: {
                show: false,
                fontSize: 18,
                color: '#fff',
              },
            },
            itemStyle: {
              normal: {
                areaColor: 'transparent',
                borderWidth: 1,
                borderColor: '#01AFEB',
              },
            },
          },
          tooltip: {
            show: true,
            trigger: 'item',
          },
          series: [
            {    //第一个值为打点所用
              type: 'scatter',
              coordinateSystem: 'geo',
              symbolSize: 12,
              itemStyle: {
                normal: {
                  color: '#D2D531',
                },
              },
              tooltip: {
                formatter: function (params) {
                  return params.name;
                },
              },
            },
            {    //第二个值为地图热力所用![这里写图片描述](https://img-blog.csdn.net/20180829170008715?watermark/2/text/aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80MjkzMTgyNQ==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70)
              type: 'map',
              mapType: 'china',
              roam: false,
              showLegendSymbol: false,
              tooltip: {
                formatter: function (params) {
                  return params.name + ' : ' + params.value;
                },
              },
              label: {
                normal: {
                  show: false,
                  fontSize: 18,
                  color: '#fff',
                },
              },
              itemStyle: {
                normal: {
                  areaColor: 'transparent',
                  borderWidth: 1,
                  borderColor: '#01AFEB',
                },
              },
            },
          ],
        },
        options: options,
}

这里写图片描述

评论 12
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值