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

dataURI method doesn't properly size/scale the legend on Safari for Mac

Open andrussuitsu opened this issue 3 years ago • 14 comments

When using optional parameters of dataURI method to size or scale the returned image, the legend is not sized or scaled properly.

Steps to Reproduce

Please have a look at codepen https://codepen.io/andrussuitsu/pen/JjZoRjB. It will open a new tab with the data:image uri returned by the dataURI method that was called with scale: 2 parameter.

Expected Behavior

The legend will scale/size together with the rest of the chart.

Actual Behavior

The legend is not scaled/sized properly.

Screenshots

screenshot

Reproduction Link

https://codepen.io/andrussuitsu/pen/JjZoRjB

andrussuitsu avatar Oct 26 '22 16:10 andrussuitsu

Forgot to mention that I am using version 3.35.5 of apexcharts.

andrussuitsu avatar Oct 26 '22 16:10 andrussuitsu

Your code pen does not duplicate the issue. The legend is properly located under the chart image

Is there missing information to duplicate this issue?

brianlagunas avatar Oct 26 '22 16:10 brianlagunas

This is an error with Safari only, it works ok on other browsers.

andrussuitsu avatar Oct 26 '22 16:10 andrussuitsu

It works on my Safari. Can anyone else duplicate this?

brianlagunas avatar Oct 26 '22 16:10 brianlagunas

I can duplicate it also on my mobile Safari on iOS 16.1

andrussuitsu avatar Oct 26 '22 16:10 andrussuitsu

IMG_1054

andrussuitsu avatar Oct 26 '22 16:10 andrussuitsu

I'm also running Safari on iOS 16. Without the ability to duplicate it, it will be very difficult to find the issue or fix it.

brianlagunas avatar Oct 26 '22 16:10 brianlagunas

I am using Safari Version 16.1 (18614.2.9.1.12) on my desktop. The issue was actually discovered by our team tester. I will ask him if he uses the same Safari version or perhaps it is an older version.

andrussuitsu avatar Oct 26 '22 16:10 andrussuitsu

DuckDuckGo Version 0.30.1 (0.30.1) also reproduces the issue.

andrussuitsu avatar Oct 26 '22 16:10 andrussuitsu

I found a better way to show the issue, without the need to enable the popups that Safari is good at blocking. https://codepen.io/andrussuitsu/pen/jOKEwMN While doing that I discovered that bigger widths than original (scale > 1) result in incorrect sizing and placement of legend while smaller widths than original (scale < 1) result in legend missing altogether. And again - this seems to happen only on Safari and DuckDuckGo, which seems to use the same engine as Safari.

andrussuitsu avatar Oct 26 '22 20:10 andrussuitsu

Our team tester, who discovered this issue, has Safari 15.6.1 (17613.3.9.1.16)

andrussuitsu avatar Oct 28 '22 07:10 andrussuitsu

Using Safari 17.3.1 on Mac Studio M2 still shows the same problem on https://codepen.io/andrussuitsu/pen/jOKEwMN. It is not only on my computer, our testers once again reported this today.

https://codepen.io/andrussuitsu/pen/jOKEwMN

andrussuitsu avatar Mar 07 '24 12:03 andrussuitsu

Our testers have discovered that the problem with the legend placement can also be seen when just changing Safari's zoom level. In fact, you can see it even on your documentation page: https://apexcharts.com/javascript-chart-demos/line-charts/dashed/

Just increase the zoom level and you will see that the chart area will change properly but the legend will stay where it is using the initial size.

Screenshot 2024-03-12 at 12 52 20

andrussuitsu avatar Mar 12 '24 10:03 andrussuitsu

it should help https://github.com/apexcharts/apexcharts.js/issues/2963#issuecomment-1127882323

littlefrontender avatar Jul 02 '24 13:07 littlefrontender