paolavaldivia opened a new issue, #21309: URL: https://github.com/apache/echarts/issues/21309
### Version 6.0.0 ### Link to Minimal Reproduction https://echarts.apache.org/examples/en/editor.html?c=bar-simple&code=GYVwdgxgLglg9mABAcwKZQNKoJ4AoBuAhgDYioCUiA3gFCKIBO6IDSRpqAdAM5SENRuAdRhQAFrgDkAWQSTKAfkSSAtnMQAuZXHGoGkgNw0AvjRpwADrASIAvNTqIAHgEEnMbltr16UbBdQtSQhCKFRkOAZsSQAaR3pCd24AGUIAI1RiL3ifGDAwhnYtAAY4nx9gSJVQgq0CEjJKWwA-akZmVkQAAyoAEio0TBx6jnJjAB9-9jJjYy7jMvLGGAgxbKWfNTB1jZ8IOGJIoKYAE1icjeI81AAJVBhkMSgtAEZSi6WAdxgT8Vfi967HxwfB6YCHT5BKAMcAhMKSD70BaIxA6MR6HZA_aHBhBNIcc5A-jfX5rRBvRZAkFgiFQmGQUKoBFA0wbVk-ZHlE6hQhaADaHxkCG52EQhDAJ0QoKiiEOYGQsvSmSlqFVelFcuQhKWkgAKmRuCLteVJEJUCcwKhDYRopSfHqxCxrbbBQAxBgwbBGu30SQAZVCLG9gr94CNOQAuo5OYhsG4PJjEH4AkFpkzo4tuHoYFb-TlvEtuXx-S8AEylRDlisvACsFYAHBWAOzVinkgDMxQjPqT_kCyjS_GZHMcUeMBiAA ### Steps to Reproduce 1. Create a bar chart with xAxis type 'category' 2. Configure xAxis.axisLabel with a formatter that returns rich text using the syntax {styleName|text} 3. Define rich text styles with both width and overflow: 'truncate' properties 4. Provide long labels that exceed the specified width values ### Current Behavior The `width` property in rich text styles is ignored. Labels are rendered at their full length regardless of the specified width constraint, causing them to overflow and overlap with other chart elements. ### Expected Behavior Labels should be truncated at the specified width value (100px for "Monday...", 10px for other days) when overflow: 'truncate' is set. Long text should be cut off to fit within the defined width. ### Environment ```markdown - OS: macOS Sequoia - Browser: Chrome 141.0.7390.56 ``` ### Any additional comments? I'm implementing a hierarchical axis with multiple levels of labels (see attached image). On the second level, some labels like "Clothing" have more horizontal space available than others like "Mobile" and "Computing" because they span multiple bars. However, since I can only define one width per rich text style (per level), I'm forced to use the smallest width that prevents overflow for the narrowest categories. This causes labels in wider sections to be unnecessarily truncated even though there's plenty of space available for them. <img width="666" height="587" alt="Image" src="https://github.com/user-attachments/assets/2ea5b52c-d667-417f-bf0a-44f6234cf532" /> -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
