🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

echarts-map-chinajs

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

echarts-map-chinajs

echarts中国地图

latest
npmnpm
Version
1.0.2
Version published
Maintainers
1
Created
Source

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: []
  }]
}

Keywords

echarts

FAQs

Package last updated on 12 May 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts