Type definition error: Type `{ matches: string; }` is not assignable to type `Partial<LayoutAxis>`
Hi,
I am getting a typescript error when I try to set 'y' in LayoutAxis.matches.
If I ignore this error and run the program, the y2 axis is as expected.
Environments
-
"plotly.js":"2.28.0" -
"@types/plotly.js":"2.12.32"
Declared here
Axis: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/plotly.js/index.d.ts#L572 LayoutAxis: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/plotly.js/index.d.ts#L832
Document
https://plotly.com/javascript/reference/layout/yaxis/#layout-yaxis-matches
matches Parent: layout.yaxis Type: enumerated , one of ( "/^x([2-9]|[1-9][0-9]+)?( domain)?$/" | "/^y([2-9]|[1-9][0-9]+)?( domain)?$/" ) If set to another axis id (e.g.
x2,y), the range of this axis will match the range of the corresponding axis in data-coordinates space. Moreover, matching axes share auto-range values, category lists and histogram auto-bins. Note that setting axes simultaneously in both ascaleanchorand amatchesconstraint is currently forbidden. Moreover, note that matching axes must have the sametype.
SS
Thank you for the support!