[BUG]: Typing issue in relayout()
@camdecoster arbeitet bereits daran.
Seit 16.9.2026.
Bewertung
Dieses Issue wurde noch nicht bewertet.
Beschreibung
Description
Updating to plotly 4.1 caused a typing issue with relayout()
For this line of code:
Plotly.relayout(this.plotlyChartEl().plotlyInstance, {
'xaxis.autorange': true,
'yaxis.autorange': true,
});
I get the following error from typescript:
I checked the code here at:
https://github.com/plotly/plotly.js/blob/v4.1.1/src/types/core/api.d.ts#L212
export function relayout(root: Root, layout: Partial<Layout>)
Here the Partial<Layout> seems to cause the issue.
Notes
Versions:
- plotly.js: 4.1.0
- angular-plotly.js: 22.0.1
- angular: 22.1.x
Alternatives
I tried:
Plotly.relayout(this.plotlyChartEl().plotlyInstance, {
xaxis: {autorange: true},
yaxis: {autorange: true},
});
but this will replace the existing xaxis properties like anchor, color, etc. will be removed -- i just want to update the autorange in this line of code
- Vorherrschende Sprache
- JavaScript
- Sterne
- 18.3k
- Forks
- 2k
- Ø Merge
- 2 T. 12 Std.
- Gemergte PRs (30 T.)
- 28
Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus plotly/plotly.js
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
-
chore P1 plotly-internal size: 1 task
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 82/100
-
chore P3 plotly-internal size: 1 task
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
-
bug infrastructure P2
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 65/100
Alle Issues in plotly/plotly.js
Ähnliche Issues
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
avniproject/avni-client#2135 ·
-
automated broken-link
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 85/100
-
agent/security hive/hosted-available-lke648397-260827-5n31 security
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
-
enhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
babalae/bettergi-scripts-list#3674 ·
-
A-Release-Notes C-Editing D-Modest S-Ready-For-Implementation
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
bevyengine/bevy-website#2595 ·