Type definition error: Type `{ matches: string; }` is not assignable to type `Partial<LayoutAxis>`
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- JavaScript
- Sterne
- 18.3k
- Forks
- 2k
- Ø Merge
- 2 T. 12 Std.
- Gemergte PRs (30 T.)
- 28
Beschreibung
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!
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginnen Sie mit den Axis- und LayoutAxis-Deklarationen, die in types/plotly.js/index.d.ts in den Zeilen 572 und 832 verknüpft sind, und vergleichen Sie sie anschließend mit den dokumentierten layout.yaxis.matches-Werten. Bestätigen Sie, dass der gemeldete Wert y von der Typdefinition akzeptiert wird, und überprüfen Sie die Deklaration anhand eines TypeScript-Beispiels in der Plotly 2.28.0-Umgebung.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- javascript, typescript
- Bereich
- data-visualization
- Issue-Typ
- Bug
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 45/100