apexcharts / apexcharts.js

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

Fix issue 4216: grid padding calc to support array of stroke widths #4410

Closed veryinsanee closed 2 months ago

veryinsanee commented 2 months ago

New Pull Request

This commit adjusts the plotCoords method to correctly handle cases where the stroke width (stroke.width) is provided as an array of values, which corresponds to different series in the visualization. Previously, the code assumed a single numeric value, leading to incorrect grid padding calculations when multiple series with different stroke widths were present.

Now, the method checks if stroke.width is an array and uses the maximum value from this array for setting grid padding, ensuring that the largest stroke width is properly accommodated.

Changes include:

Fixes #4216

Type of change

Checklist:

lmansur commented 2 months ago

Thanks @veryinsanee!

Seros commented 2 weeks ago

I'm just facing the same issue when I want to change the width of the stroke for multiple series from an numer to an array at https://github.com/VueTorrent/VueTorrent/blob/master/src/components/Navbar/SideWidgets/SpeedGraph.vue#L31 The packages are all up2date but still the graph does not show up. Do you have any idea?