Skip to content

中国地图 ,在省份没有数据的情况下,tooltip {c} 会显示为NaN #6647

@l745230

Description

@l745230

One-line summary [问题简述]

中国地图 ,在省份没有数据的情况下,tooltip {c} 会显示为NaN

Version & Environment [版本及环境]

  • ECharts version [ECharts 版本]: 3.7.1
  • Browser version [浏览器类型和版本]: QQ浏览器最新版
  • OS Version [操作系统类型和版本]: win7

Expected behaviour [期望结果]

toolTip 值不显示 或者显示为0

ECharts option [ECharts配置项]

option = {
 tooltip: {
        trigger: 'item',
        formatter: '{b} <br/> 付款金额:{c}'
      },
      visualMap: {
        min: 0,
        max: 20,
        left: 'left',
        top: 'bottom',
        text: ['高', '低'],           // 文本,默认为数值文本
        calculable: true
      },
      series: [
        {
          name: '中国',
          type: 'map',
          mapType: 'china',
          selectedMode: 'single',
          label: {
            normal: {
              show: false
            },
            emphasis: {
              show: true
            }
          },
          data: [
              { name: '安徽', value: '15' },
              { name: '福建', value: '5' }
          ]
        }
      ]
}

Other comments [其他信息]

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions