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
Is it possible to put the y-axis both left and right? #11589
Comments
Hi! We've received your issue and please be patient to get responded. 🎉 In the meanwhile, please make sure that you have posted enough image to demo your request. You may also check out the API and chart option to get the answer. If you don't get helped for a long time (over a week) or have an urgent question to ask, you may also send an email to dev@echarts.apache.org. Please attach the issue link if it's a technical questions. If you are interested in the project, you may also subscribe our mail list. Have a nice day! 🍵 |
So you want two axes on two sides, and they are the same? |
This issue is labeled with |
@Ovilia thanks for your quick reply! I had previously tried something like this, but ran into problems with deviating values, as you mentioned. I thought that was because the min & max was automatically deducted from the series, but on second thought, I think I overlooked something. I will try again and get back shortly... |
I can't seem to get it working. We are using "dataMin" and "dataMax" to set the scale of the y-axis, but when I duplicate the y-axis, the 2nd y-axis doesn't get rendered. I think it requires a 2nd series? (N.B. If I manually provide a min and max it does get rendered.) Aside from that, I would say that it would be more robust and clean to just declare that you want the y-axis printed twice, rather than duplicating it manually. Wouldn't you agree? |
You need an extra series binding to the second y axis and keep the two series and axes the same. |
As I pointed out in the first post, I did try duplicating the entire series. So, yeah, that would certainly work. And I guess it might be doable in case of a small chart, but does have a negative performance impact on rendering larger data sets. I would personally argue that this is a suboptimal solution/workaround. |
Set the second series to be |
This issue is closed due to not being active. Please feel free to open it again (for the author) or create a new one and reference this (for others) if you have further questions. |
I'm sorry, I kind of forgot about this. Nevertheless, I still do not understand why you would want me to duplicate an entire series, and then set it to show: false. It makes the code ugly, less descriptive and (most probably) also perform much less. |
What problem does this feature solve?
We would like to have the y-axis of a chart (with only 1 y-axis) on both left and right. This way, the user would have more context about the value of the chart on the far end of the chart.
I have tried some workarounds, looked in the documentation and asked a question on StackOverflow , but I haven't been able to achieve this, other then completely duplicating the entire series, which is undesirable of course.
Hence, I think this is a feature request.
What does the proposed API look like?
The y-axis configuration already has a position property, which has the options 'left' and 'right'. Please add option 'both'.
The text was updated successfully, but these errors were encountered: