echarts [Bug] - All X-Axis labels are not shown

8tntrjer  于 4个月前  发布在  Echarts
关注(0)|答案(1)|浏览(40)

Version

5.5.0

https://echarts.apache.org/examples/en/editor.html?c=line-simple&version=5.4.3&code=PYBwLglsB2AEC8sDeBYAULTsBEBzAThACbYBcy6WVOANgKYBmYZsADADSXWbaG4AWzchy7dsAI2BgwwALYsAzK1GwAvpwxZsADwCC2iAGcWAbRVVUm7lWxEAhmDunz1m4buyQ9WAEZY7z3psDVdXbACvOlgAJn8PSOCXUJwI7wU4wLpEq2StVKiAFgyEkNy3eO8AVmKg0rKefNgANhqsuvreOllgADcosH4o6DptMFgnJOoAXXawuwNDABk7cToaFkt6rQYYMABlCAAvLPIfERyy7F66fAYaYAB3FmwwfABXaABjBzbJsIfiAMWABOc5bBr8R4sV5vOizXLYfjEOgAeT6-BodhALAYdhohjofywqkmJJyMxU2AAnvojM4LlhNgjDJCnuQYYSGZgyVQpuhVABuIA

Steps to Reproduce

I have a simple chart, with 7 labels on the x-axis.

below are the options for axislabel under x-axis.

"axisLabel": {
"fontSize": 10,
"overflow": "truncate",
"width": 90,
"show": true,
"hideOverlap": false
}
The label seems to be truncated if the width of the label is exceeded more than 90 and ellipsis can be seen.

ISSUE: All the labels are not seen and only alternative labels are shown in the axis.

By reducing the length of the label from the axis labels, all the labels seem to be rendering.
(for ex: please remove the last character from the last label for all the labels to render)

Labels hidden

All labels seen after removing some characters from the labels.

Please go through the below link for the issue reproduction.

https://echarts.apache.org/examples/en/editor.html?c=line-simple&version=5.4.3&code=PYBwLglsB2AEC8sDeBYAULTsBEBzAThACbYBcy6WVOANgKYBmYZsADADSXWbaG4AWzchy7dsAI2BgwwALYsAzK1GwAvpwxZsADwCC2iAGcWAbRVVUm7lWxEAhmDunz1m4buyQ9WAEZY7z3psDVdXbACvOlgAJn8PSOCXUJwI7wU4wLpEq2StVKiAFgyEkNy3eO8AVmKg0rKefNgANhqsuvreOllgADcosH4o6DptMFgnJOoAXXawuwNDABk7cToaFkt6rQYYMABlCAAvLPIfERyy7F66fAYaYAB3FmwwfABXaABjBzbJsIfiAMWABOc5bBr8R4sV5vOizXLYfjEOgAeT6-BodhALAYdhohjofywqkmJJyMxU2AAnvojM4LlhNgjDJCnuQYYSGZgyVQpuhVABuIA

Expectation: All labels should be shown, and if the label length exceeds the width specified, the labels exceeding should be truncated.

Current Behavior

Labels hidden when the length of the label is longer, even after width and overflow options are given.

Expected Behavior

All labels should be shown, based on the width and overflow options, the label should be either wrapped or truncated.

Environment

- OS:Windows
- Browser: chrome
- Framework:

Any additional comments?

No response

iqjalb3h

iqjalb3h1#

(A) All labels should be shown, (B) based on the width and overflow options, the label should be either wrapped or truncated.

A: use interval, B: use shorter width to see truncation - Demo

相关问题