apexcharts / apexcharts.js

📊 Interactive JavaScript Charts built on SVG
https://apexcharts.com
MIT License
14.1k stars 1.28k forks source link

Zoom and autoScaleYaxis issues #1260

Open alinpetrusca opened 4 years ago

alinpetrusca commented 4 years ago

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! :)

seladb commented 4 years ago

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?

junedchhipa commented 4 years ago

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

seladb commented 4 years ago

are there any plans to fix this any time soon?

junedchhipa commented 4 years ago

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!

seladb commented 4 years ago

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

seladb commented 4 years ago

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

junedchhipa commented 4 years ago

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.

UmangH-softura commented 4 years ago

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

tchin8 commented 3 years ago

Any progress on this issue?

maegi90 commented 2 years ago

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.

AlbertoPGH commented 2 years ago

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

Thanks a lot! 👍

Neyoui commented 1 year ago

Hi, any updates?

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

iOrcohen commented 7 months ago

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

capveg-netdebug commented 3 months ago

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?