Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

echarts 100%宽变为100px如何重新渲染 #8243

Closed
zhuchen320 opened this issue Apr 28, 2018 · 2 comments
Closed

echarts 100%宽变为100px如何重新渲染 #8243

zhuchen320 opened this issue Apr 28, 2018 · 2 comments
Labels
stale Inactive for a long time. Will be closed in 7 days.

Comments

@zhuchen320
Copy link

One-line summary [问题简述]

tab切换之后echarts的百分比宽高变为固定px值,显示不全无法获得正确宽高

Version & Environment [版本及环境]

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

Expected behaviour [期望结果]

tab切换echarts能够正确渲染

ECharts option [ECharts配置项]

option = {
tooltip: {
        trigger: 'item',
        backgroundColor: 'rgba(88, 100, 117, .9)',
        // formatter: "{b}: {c} ({d}%)"
      },
      grid: {
        left: '3%',
        right: '4%',
        bottom: '3%',
        containLabel: true
      },
      legend: {
        itemGap: 70,
        data:[
          {
            name: '直接委托',
            icon: 'circle'
          },
          {
            name: '招投标项目',
            icon: 'circle'
          }
        ]
      },
      series: [
        {
          type:'pie',
          radius: ['35%', '60%'],
          avoidLabelOverlap: false,
          label: {
            normal: {
              position: 'inner',
              formatter: '{d}%',
              textStyle: {
                color: '#fff',
                fontWeight: 'bold',
                fontSize: 14
              }
            }
          },
          labelLine: {
            normal: {
              show: false
            }
          },
          data:[
            {
              value: 12000,
              name:'直接委托',
              itemStyle: {
                color: '#2F82BE'
              }
            },
            {
              value: 8000, 
              name:'招投标项目',
              itemStyle: {
                color: '#BDECF8'
              }
            }
          ]
        }
      ]
}

Other comments [其他信息]

@lingwenzhi
Copy link

需要dispose,然后重新init

@stale
Copy link

stale bot commented Apr 28, 2020

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 stale bot added the stale Inactive for a long time. Will be closed in 7 days. label Apr 28, 2020
@stale stale bot closed this as completed May 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Inactive for a long time. Will be closed in 7 days.
Projects
None yet
Development

No branches or pull requests

2 participants