Skip to content

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

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

Closed
andrussuitsu opened this issue Oct 26, 2022 · 14 comments
Closed
Labels
bug Something isn't working

Comments

@andrussuitsu
Copy link

andrussuitsu commented Oct 26, 2022

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 andrussuitsu added the bug Something isn't working label Oct 26, 2022
@andrussuitsu
Copy link
Author

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

@brianlagunas
Copy link
Member

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?

@andrussuitsu
Copy link
Author

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

@brianlagunas
Copy link
Member

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

@andrussuitsu
Copy link
Author

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

@andrussuitsu
Copy link
Author

IMG_1054

@brianlagunas
Copy link
Member

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.

@andrussuitsu
Copy link
Author

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
Copy link
Author

DuckDuckGo Version 0.30.1 (0.30.1) also reproduces the issue.

@andrussuitsu
Copy link
Author

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
Copy link
Author

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

@andrussuitsu
Copy link
Author

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
Copy link
Author

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

@littlefrontender
Copy link

it should help #2963 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants