apexcharts / Blazor-ApexCharts

A blazor wrapper for ApexCharts.js
https://apexcharts.github.io/Blazor-ApexCharts
MIT License
784 stars 91 forks source link

graph does not correctly check the minimum and maximum Y Axis #429

Closed sweco-bepedm closed 5 months ago

sweco-bepedm commented 5 months ago

Dear devs,

I'm facing an issue that's been bothering for the past weeks. The graph does not recognize the correct min and max values, and the results look like this:

image image

as you can see, the minimum value is not corresponding to the minimum of the graphs appearing, ending up in clipped graphs.

Now the strange part is that this is somethign recent, I've been using ApexCharts for longer than a year and that wasn't a problem, it's not an issue for teh past months.

Any idea how to fix this?

joadan commented 5 months ago

Hi,

Do you have any more info? Maybe a minimal repo to reproduce? Did it work before in previous versions?

It could be related to negative values, do you see the same issue with only positive values.

sweco-bepedm commented 5 months ago

it used to work before, only very recently this started to be an issue, and it happens in different graphs as I showed here, so it's something changed in the core of the script. Maybe it's the javascript script?

It only happens in negative values, from what i've seen.

I'll try to create a repo to reproduce the error

sweco-bepedm commented 5 months ago

here is a repo with the issue occurring. It was easier than I thought to reproduce, it just needed to make a negative value with the examples on the website.

https://github.com/sweco-bepedm/Graphissue

it indeed seems to only happens for negative values image

joadan commented 5 months ago

Thanks,

Have you tested to manually provide the Yaxis min/max values? I noticed that this is done in the apexcharts.js sample https://apexcharts.com/javascript-chart-demos/bar-charts/bar-with-negative-values/

sweco-bepedm commented 5 months ago

yes, you can fix it doing that, but as I said, this wasn't an issue a couple of months ago, something has changed that broke the graphs. The graph should automatically detect the min and max value for correct rendering.

joadan commented 5 months ago

Hi

I'm sorry but If you believe this is an issue in apexcharts.js, you should raise the issue the that repo. Please re-open if you think this is an issue in the wrapper.