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

Treemap does not center vertically after setting the rich attribute #1014

Open
setWan opened this issue Jun 2, 2023 · 0 comments
Open

Treemap does not center vertically after setting the rich attribute #1014

setWan opened this issue Jun 2, 2023 · 0 comments

Comments

@setWan
Copy link

setWan commented Jun 2, 2023

1、open url:https://echarts.apache.org/examples/en/editor.html?c=treemap-disk
2、setting option:

option = {
  series: [
    {
      type: 'treemap',
      name: '中国',
      leafDepth: 1,
      drillDownIcon: '',
      width: '100%',
      height: 160,
      top: 'top',
      bottom: 32,
      label: {
        align: 'center',
        verticalAlign: 'top',
        formatter(params) {
          return `${params.name}\n(${params.value}/{high|${params.value}})`
        },
        rich: {
          high: {
            color: 'red'
          }
        }
      },
      data: [
        {
          name: '北京',
          value: 20,
          children: [
            {
              name: 'qiche',
              value: 20
            }
          ]
        },
        {
          name: '北京',
          value: 20
        },
        {
          name: '北京',
          value: 30
        },
        {
          name: '北京',
          value: 10
        },
        {
          name: '北京',
          value: 10
        },
        {
          name: '北京',
          value: 5
        },
        {
          name: '其他',
          value: 5
        }
      ]
    }
  ]
}

3、Invalidate vertical centering after setting the rich attribute

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant