apache / echarts

Apache ECharts is a powerful, interactive charting and data visualization library for browser
https://echarts.apache.org
Apache License 2.0
60.54k stars 19.61k forks source link

[Bug] When series label background color is applied in tree map chart, It is getting applied to entire block. #18478

Open Teja0191 opened 1 year ago

Teja0191 commented 1 year ago

Version

5.4.2

Link to Minimal Reproduction

https://echarts.apache.org/examples/en/editor.html?c=treemap-disk&code=LYTwwgFghgTgLgOgM4QPYHcAyqoBMCWAdgOYAUAlANwBQAJAsQKZykBKA8uwCoD6ACgEEuACQAEAalEByAPS4ocKDKhIkzOQqUEkAawRwYjRggBWSVISkAaUQDMAroQDGcfBdGltOgCKbyogG9qUVFQSFhECHxcRmw8IjIqYNEnCyQ4O1QYYAUAVVcAG1EAXlFGJ2h4JARbLJy4GhCHZ1d3JjhMRgA3RgL2AAdWwgpA5JDDOHsYQlEAbTGQ0cXl0Xw4RmAAZTgQAsYALiWV5YAjLJiYAHVouAhDgAYrBePiKH7r3FvDgFZnxYBfP7_J7HILHEJrDbbXYHI7g0Svd43O6iACMfxCgOOwL-YPBqQKWU2CimCjchEOs3uCAAzN8bNTvgBdEHgyFbHZ7Q54-GIj5fNGs-FnGAXMCoQkwYmTGBkiwPBAANgxoixKzVISZjVVyTClUQajgAyGpAWpFQg3JJThi1ccC5NuW6wAHnBDlJvPhdKJckgoExrCq9rY3dInIxCOsYFIgULbagJa5-tyVbVsgoo4dmi4raQiLV_DzwV1YKISwV7IxrfnUAhy5XtfCSzBRAYjHwFBAAJKEWrV3u1tuMDu3Hu1RvF0tDkcQa2zLUqppZDzN1bW1GUNcAHlbhmHnbHtb2JFum_w4nEhcXtr3M4Q_XsKFI04PA9m-CZCEIUGAjCS8Mxa8JimGZ5gAxYpC3AguhSAoVCQYoACI4ATAokwAWjtPZEIAPikCRr2WNN6nyfACgQCNUhiYQuAAWUwZ9b07UxUCIUhZCkch_HEQiIK3OR8C6PC43hD0vR0H0_SYd0JEydM4FI8i8FwcVgByJBSHrP9ZPwgBpAAhGNwM_ExWOGKROInZYNQBETRDUGB8EYJBKRVItjm_X93U9b1fX9RhA3AnZ-lhKQhxyfpAoArovXwE49loohDhpe5HmvOCTl6FNwJCFAMEOAxKzs45iIzRgYHdAITn-KLwJOKAnB0YgYFQRwVIlLJ9ikQxcCMgCcXA9loQddzwRFMUOoq6QAGJbDmvr4QGgC9h6AoXIRZhOlW41yQoYrFnkRRDi8XxFBVGzNQWf5yGSJJrsoIA

Steps to Reproduce

1.Create a basic tree map chart as provided in the link to minimal reproduction. 2.Add backgroundColor property in series label and observe the chart.

Current Behavior

color getting applied to entire block.

Expected Behavior

color should be applied as background color for the label.

Environment

- OS:Windows
- Browser:chrome

Any additional comments?

No response

helgasoft commented 1 year ago

"color should be applied as background color for the label." Try this:

label: {
  show: true,
  formatter: '{aa|{b}}',
  rich: { aa: {backgroundColor: 'red'}}
}