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

[Feature] 如何控制x/y轴上与dataZoom联动的刻度的精度 #20765

Open
292328914 opened this issue Feb 18, 2025 · 3 comments
Open

[Feature] 如何控制x/y轴上与dataZoom联动的刻度的精度 #20765

292328914 opened this issue Feb 18, 2025 · 3 comments
Labels
new-feature pending We are not sure about whether this is a bug/new feature.

Comments

@292328914
Copy link

What problem does this feature solve?

Image
如图,当我对拖动dataZoom栏时,y轴最顶部和底部的刻度会显示当前的范围,我想对这个刻度的精度进行控制,有哪个配置项可以支持。
yAxis.axisLabel.formatter会影响y轴其他正常情况下的刻度,感觉也不是很合适。

What does the proposed API look like?

同上

@echarts-bot echarts-bot bot added the pending We are not sure about whether this is a bug/new feature. label Feb 18, 2025
Copy link

echarts-bot bot commented Feb 18, 2025

@292328914 It seems you are not using English, I've helped translate the content automatically. To make your issue understood by more people and get helped, we'd like to suggest using English next time. 🤗

TRANSLATED

TITLE

[Feature] How to control the accuracy of the scale linked to dataZoom on the x/y axis

@MatthiasMert
Copy link

I think the easiest way would be to just show rounded values by adjusting dataZoom.labelPrecision and yAxis.axisLabel.formatter.

Example

Another option would be to use the dataZoom event and action to correct the zoom to rounded values. In this case I would advise on using realtime=false.

@292328914
Copy link
Author

I think the easiest way would be to just show rounded values by adjusting dataZoom.labelPrecision and yAxis.axisLabel.formatter.

Example

Another option would be to use the dataZoom event and action to correct the zoom to rounded values. In this case I would advise on using realtime=false.

thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-feature pending We are not sure about whether this is a bug/new feature.
Projects
None yet
Development

No branches or pull requests

2 participants