apexcharts / apexcharts.js

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

Responsive option does not work correctly with version 3.49.1 #4519

Closed giaroc closed 3 weeks ago

giaroc commented 3 weeks ago

Description

If I define responsive options for a specific breakpoint, they are no longer applied correctly starting from version 3.49.1 of ApexCharts. However, they are applied correctly with previous versions (including 3.49.0). Only if I resize the window, the responsive options are displayed correctly.

Steps to Reproduce

  1. Install ApexCharts 3.49.1.
  2. Define different responsive options to change the charts for a specific screen size.
  3. Load the page with a screen size smaller than the defined responsive option (in the CodePen example, it's 580px).
  4. The chart loads without the responsive options.
  5. If the screen is manually resized, the responsive options are immediately applied.

Expected Behavior

The output on screen under 580 pixel should be the following:

Screenshot 2024-06-10 alle 12 38 27

Actual Behavior

The actual output does not follow the specific for the breakpoint:

Screenshot 2024-06-10 alle 12 38 01

When the screen is manually resized, all the responsive options are applied.

Reproduction Link

Reproduction example:

https://codepen.io/giaroc/pen/WNBEqze

Screenshot 2024-06-10 alle 12 58 52