Closed veryinsanee closed 2 months ago
Thanks @veryinsanee!
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?
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:
stroke.width
is an array.Math.max(...)
to find the maximum stroke width when necessary.gridPad.top
andgridPad.bottom
.Fixes #4216
Type of change
Checklist: