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
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
Thanks for the report. This is a limitation of how plotly.js and TS interact. plotly.js allows one to update references as a string like you describe, but TS has no way to know that's valid. IIRC, DefinitelyTyped included some of the more common strings as valid options. I thought I had included some in the new types, but maybe I missed that. I'll take a look and follow up.
Generates common nested axis/title properties on \Layout\ (\xaxis.autorange, \yaxis.autorange, \xaxis.range, \xaxis.type, \xaxis.title, etc.) for direct IDE autocompletion and hover types.
Emits template literal index signatures [key: \.\]: any;\ and [key: \[\]: any;\ on \Layout. This allows arbitrary dotted and indexed attribute paths, while strictly preserving excess property checks for non-dotted top-level layout keys (e.g. typos like { titl: '...' }\ continue to be caught and rejected by TypeScript).
**\src/types/core/api.d.ts**:
Added 2-parameter string attribute path overloads for \Plotly.relayout(root, astr, val)\ and \Plotly.restyle(root, astr, val, traces?).
Updated
estyle\ and \update\ to allow \Partial | Record<string, any>\ for dotted trace attribute updates.
Activity
camdecoster commentedon Sep 16, 2026
Thanks for the report. This is a limitation of how plotly.js and TS interact. plotly.js allows one to update references as a string like you describe, but TS has no way to know that's valid. IIRC, DefinitelyTyped included some of the more common strings as valid options. I thought I had included some in the new types, but maybe I missed that. I'll take a look and follow up.
CAOShurong commentedon Sep 16, 2026
I've opened #8050 to resolve this cleanly!
Summary of Fix
estyle\ and \update\ to allow \Partial | Record<string, any>\ for dotted trace attribute updates.
Verified via
pm run typecheck,
pm run schema-typegen-diff-check, and
pm run lint\ (all clean).
camdecoster commentedon Sep 22, 2026
I'll take a look at the PR. I have opinions about how this should be added.