Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix issue 4216: grid padding calculation to support array of stroke w…
…idths 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. This fix improves the rendering of visual elements in the chart by preventing clipping and ensuring consistent padding. Changes include: - Adding a condition to determine whether `stroke.width` is an array. - Using `Math.max(...)` to find the maximum stroke width when necessary. - Applying this maximum value to adjust `gridPad.top` and `gridPad.bottom`.
- Loading branch information