[BUG]: Typing issue in relayout()
Maintainers usually reply within 1 day
@camdecoster is already working on this.
Since Sep 16, 2026.
Assessment
This issue has not been assessed yet.
Description
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
- Dominant language
- JavaScript
- Stars
- 18.3k
- Forks
- 2k
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 21
Getting set up
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from plotly/plotly.js
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
chore P3 plotly-internal size: 3 task
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
Maintainers usually reply within 1 day
-
chore P1 plotly-internal size: 1 task
Difficulty 1/5 Under an hour Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
chore P3 plotly-internal size: 1 task
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
plotly/plotly.js#7648 · 3 comments ·
Maintainers usually reply within 1 day
All issues in plotly/plotly.js
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
parse-community/parse-server#10699 · 1 comment ·
Maintainers usually reply within 1 day
-
area: dashboard bug perceived difficulty: 3
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Nitjsefnie-Harness-Commons/daedalus#1179 ·
Maintainers usually reply within 1 day
-
Aframe enhancement javascript
Difficulty 1/5 Under an hour Newbie friendliness 92/100
webarkit/Aframe-nft#17 ·
-
spec-feedback
Difficulty 2/5 1-3 hours Newbie friendliness 75/100