echarts icon indicating copy to clipboard operation
echarts copied to clipboard

[Bug] cannot display all labels that don't overlap with type time

Open spiral2k opened this issue 2 years ago • 2 comments

Version

5.4.3

Link to Minimal Reproduction

https://codesandbox.io/p/sandbox/echarts-charts-sync-poc-forked-ycn4mj

Steps to Reproduce

I'm rendering a chart and I set the xAxis to type=time with axisLabel.interval = 0 & axisLabel.hideOverlap=true I want to display all labels that don't overlap but the configuration seems to not affect the labels tried to pass a timestamp to the xAxis.interval, but that doesn't work either

Current Behavior

It shows only 1 label (not including showMinLabel & showMaxLabel) and i cannot change it

Expected Behavior

display all labels that don't overlap with the given space OR be able to display labels by interval (like a minute)

Environment

- OS: macOS Monterey
- Browser: Chrome 119.0.6045.199
- Framework: [email protected]

Any additional comments?

thank you

spiral2k avatar Dec 11 '23 14:12 spiral2k

not-a-bug For interval the documentation says "available in category axis (only)". The word "only" at the end is missing, but implied. And that means interval is not supported for axis type time.

Also it looks like the auto-interval label strategy for time values is each second. Your values OTOH are in milliseconds. Demo Code

helgasoft avatar Dec 11 '23 19:12 helgasoft

This issue has been automatically marked as stale because it did not have recent activity. It will be closed in 7 days if no further activity occurs. If you wish not to mark it as stale, please leave a comment in this issue.

github-actions[bot] avatar Dec 10 '25 21:12 github-actions[bot]

This issue has been automatically closed because it did not have recent activity. If this remains to be a problem with the latest version of Apache ECharts, please open a new issue and link this to it. Thanks!

github-actions[bot] avatar Dec 17 '25 21:12 github-actions[bot]