apexcharts.js icon indicating copy to clipboard operation
apexcharts.js copied to clipboard

Zoom and autoScaleYaxis issues

Open alinpetrusca opened this issue 5 years ago • 14 comments

Hello,

I have some problems with zoom & autoScaleYaxis, when having two series that share the same yAxis. I'm using react-apexcharts, but it seems that this is a bug from apexcharts.

Codepen: https://codepen.io/alin13/pen/GRgLYVx?editors=0010

- What is the behavior you expect? The zoom feature should work as expected and the y axis should scale based on zoom values / level.

- What is happening instead? Y axis doesn't scale correctly.

- What error message are you getting? No errors / warnings displayed.

Any ways to fix this problem ?

Thank you for your time! :)

alinpetrusca avatar Jan 28 '20 10:01 alinpetrusca

I have the exact same problem. I'm also using react-apexcharts.

I see you marked this issue as a bug, is there a workaround until it will be fixed?

seladb avatar Jan 29 '20 06:01 seladb

autoScaleYaxis have some issues in an irregular multi-series chart.

junedchhipa avatar Feb 09 '20 06:02 junedchhipa

are there any plans to fix this any time soon?

seladb avatar Feb 09 '20 06:02 seladb

Yes, it will be addressed in the future. The original contributor who worked on the autoScaleYaxis couldn't fix this. But, I will re-visit it after fixing high priority bugs. Thank you!

junedchhipa avatar Feb 09 '20 07:02 junedchhipa

thank you! should we keep this issue open to track it?

seladb avatar Feb 09 '20 07:02 seladb

btw, I can work on that also, but I'll need some guidance from you on where to start

seladb avatar Feb 12 '20 07:02 seladb

Sure, the function autoScaleY() for this is located at https://github.com/apexcharts/apexcharts.js/blob/master/src/modules/Scales.js#L452

There is a console.warn at the beginning which says the functionality is unavailable in a multi-series chart. So, currently, the function deals with the single y-axis. When you work on it, make sure to test mixed/combo charts with multiple y-axes.

Thanks for your contribution.

junedchhipa avatar Feb 12 '20 16:02 junedchhipa

Hi,

I have been trying to get the autoScaleYaxis to work in react (time-series line chart) using the same option with only one series and still the auto scale does not work and seems to have 0 as the min value always on the chart even when I didn't assign any minimum value. Looking forward to the solution.

Thanks

UmangH-softura avatar Mar 12 '20 18:03 UmangH-softura

Any progress on this issue?

tchin8 avatar Mar 26 '21 20:03 tchin8

Hi,

Have the same problem with a candlestickchart, yaxis dosen't scale right on xaxis zoom.

chart: { zoom: { enabled: true, type: "x", autoScaleYaxis: true, }, }, xaxis: { type: "datetime", },

Is there any plan to fix this issue?

Thak you.

maegi90 avatar Aug 24 '21 14:08 maegi90

I have also noticed that autoScaleYaxis doesn't work when you have 2 synchronized charts. Is that expected?

Thanks a lot! 👍

AlbertoPGH avatar Aug 25 '21 14:08 AlbertoPGH

Hi, any updates?

The bug is driving me crazy in combination with synchronized charts.

Neyoui avatar Jan 11 '23 14:01 Neyoui

Hi, any update on this issue ? It's really frustrated

iOrcohen avatar Dec 19 '23 12:12 iOrcohen

This seems related to performance problems in #1706 which was closed due to in-activity rather than being resolved. Particularly for Zoomable data, downsampling is not the right thing to do. Any thoughts on this?

capveg-netdebug avatar Apr 29 '24 20:04 capveg-netdebug