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
I'm getting what I believe to be an incorrect type error. I'm using typescript and I needed to set the automargin for the xaxis to "bottom" to avoid an infinite automargin loop. When I did that I got a type error that string is not assignable to type "boolean | undefined".
Screenshot:
However the automargin behaves as expected and the infinite automargin loop is gone so it's clear that the value can indeed be a string. I fixed it by augmenting the LayoutAxis and Layout type like so.
I'm getting what I believe to be an incorrect type error. I'm using typescript and I needed to set the automargin for the xaxis to "bottom" to avoid an infinite automargin loop. When I did that I got a type error that string is not assignable to type "boolean | undefined".
Screenshot:
However the automargin behaves as expected and the infinite automargin loop is gone so it's clear that the value can indeed be a string. I fixed it by augmenting the
LayoutAxis
andLayout
type like so.Screenshot:
But then I also had to cast it in the component layout property
Screenshot:
I believe the fix is to update the LayoutAxis type in @types/plotly.js here: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/plotly.js/index.d.ts#L937
Hope this helps.
The text was updated successfully, but these errors were encountered: