echarts icon indicating copy to clipboard operation
echarts copied to clipboard

ECharts有支持显示和隐藏title标题的事件吗

Open shenguiming opened this issue 8 years ago • 3 comments

default

One-line summary [问题简述]

ECharts可以通过dispatchAction事件显示和隐藏提示框,有没有支持可以显示隐藏title标题的事件?

Version & Environment [版本及环境]

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

Expected behaviour [期望结果]

ECharts option [ECharts配置项]

option = {
title: {
          top: '10%',
          text: '中国地图',
          subtext: '虚拟数据',
          left: 'center',
          show: true
        },
        tooltip: {
          show: true,
          trigger: 'item',
          formatter: function (params) {
            return params.name + ' : ' + params.value + '万'
          }
        },
        visualMap: {
          show: true,
          type: 'piecewise',
          splitNumber: 5,
          inverse: false,
          orient: 'vertical',
          pieces: [{
            gt: 0,
            lte: 10,
            label: '10万以下',
            color: '#00FFFF'
          }, {
            gt: 10,
            lte: 30,
            label: '10万 - 30万',
            color: '#00CCFF'
          }, {
            gt: 30,
            lte: 50,
            label: '30万 - 50万',
            color: '#0066FF'
          }, {
            gt: 50,
            lte: 100,
            label: '50万 - 100万',
            color: '#0099FF'
          }, {
            min: 100,
            label: '100万以上',
            color: '#0033FF'
          }],
          left: 'left',
          top: '75%'
        },
        series: [
          {
            name: '中国',
            type: 'map',
            mapType: 'china',
            label: {
              normal: {
                show: true
              },
              emphasis: {
                show: true,
                areaColor: '#fff'
              }
            },
            itemStyle: {
              color: '#fff'
            },
            data: []
          }
        ]
      })

}

Other comments [其他信息]

Uploading 中国地图.png…

shenguiming avatar Mar 12 '18 09:03 shenguiming

setOption({
   title: {
       show:true   //true显示,false隐藏
    }
});

dfEric avatar Mar 13 '18 02:03 dfEric

Buth this will re-render hole chart. Can we do this by avoiding this.

amittonge avatar Aug 08 '18 07:08 amittonge

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Aug 08 '20 07:08 stale[bot]