You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Svg invalid number error when trying to draw bar chart with corner radius causes crash. This seemed to only happen under some very specific circumstances with data and screen sizes.
Fatal Exception: java.lang.Error Invalid number formating character 'N'
Found that in function solveX in these two files was returning NaN in the case where cornerRadius = 4
Is there an existing issue for this?
Code of Conduct
Victory version
36.9.2
Code Sandbox link
No response
Bug report
Svg invalid number error when trying to draw bar chart with corner radius causes crash. This seemed to only happen under some very specific circumstances with data and screen sizes.
Fatal Exception: java.lang.Error Invalid number formating character 'N'
Found that in function
solveX
in these two files was returningNaN
in the case where cornerRadius = 4victory-bar/es/geometry-helper-methods.js b/node_modules/victory-bar/es/geometry-helper-methods.js
victory-bar/src/geometry-helper-methods.ts b/node_modules/victory-bar/src/geometry-helper-methods.ts
This was due to a floating point error when calculating the powers within this function
Resulting in it trying to calculate
Math.sqrt(0 - 0.000000000000146)
We ended up patching this function to check if the value is less than 0
Potentially related to this issue which mentions rounded cornerRadius as a potential fix: #2654
The text was updated successfully, but these errors were encountered: