echarts-map-chinajs

    1.0.2 • Public • Published

    echarts chinajs 中国地图

    解决文字重叠问题
    

    AMD OR CommonJS OR Browser globals

    (function (root, factory) {
      if (typeof define === 'function' && define.amd) {
        // AMD. Register as an anonymous module.
        define(['exports', 'echarts'], factory)
      } else if (typeof exports === 'object' && typeof exports.nodeName !== 'string') {
        // CommonJS
        factory(exports, require('echarts'))
      } else {
        // Browser globals
        factory({}, root.echarts)
      }
    }(this, function (exports, echarts) {
      ...
    })

    setting

    option = {
      tooltip: {
        show: true,
        trigger: 'item'
      },
      visualMap: {
        inverse: false,
        bottom: 3,
        left: 3,
        precision: 1,
        show: false,
        type: 'piecewise',
        splitNumber: 4,
        itemWidth: 15,
        itemHeight: 8,
        itemGap: 5,
        textStyle: {
          fontSize: 10,
          color: '#999'
        },
        pieces: [
          { gte: 3, color: '#FF7900' },
          { gte: 2.5, lt: 3, color: '#002F82' },
          { gte: 2, lt: 2.5, color: '#084ABF' },
          { gte: 1.5, lt: 2, color: '#2B76E2' },
          { gte: 1, lt: 1.5, color: '#4D99F4' },
          { gte: 0.5, lt: 1, color: '#88C4FF' },
          { gte: 0.2, lt: 0.5, color: '#99CEF2' },
          { lt: 0.2, color: '#BDE7FF' }
        ]
      },
      series: [{
        top: 40,
        type: 'map',
        map: 'china', // 自定义扩展图表类型
        zoom: 1.2,
        roam: false,
        label: {
          show: true,
          fontSize: 10,
          color: '#000000'
        },
        selectedMode: false,
        emphasis: {
          label: {
            fontSize: 10,
            color: '#000000'
          }
        },
        data: []
      }]
    }

    Install

    npm i echarts-map-chinajs

    DownloadsWeekly Downloads

    1

    Version

    1.0.2

    License

    MIT

    Unpacked Size

    116 kB

    Total Files

    4

    Last publish

    Collaborators

    • lizhenchao