Skip to content

Fix ternary.sum relayout recalculation - #8128

Open
Lexachoc wants to merge 4 commits into
plotly:mainfrom
Lexachoc:fix-layout-ternary-sum-bug
Open

Lexachoc wants to merge 4 commits into
plotly:mainfrom
Lexachoc:fix-layout-ternary-sum-bug

Conversation

@Lexachoc

@Lexachoc Lexachoc commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Closes #8127

Ensure changes to layout.ternary.sum trigger recalculation of ternary trace data, preventing stale calcdata after Plotly.relayout.

Reproduce with devtools

Open:

http://localhost:3000/devtools/test_dashboard/index.html

Then run in the console:

Plotly.newPlot(gd, [{
    type: 'scatterternary',
    mode: 'markers',
    a: [0.2],
    b: [0.3],
    marker: {size: 16},
    hovertemplate:
        'a=%{a}<br>' +
        'b=%{b}<br>' +
        'c=%{c}<extra></extra>'
}], {
    ternary: {
        sum: 1
    }
});

Then:

Plotly.relayout(gd, {
    'ternary.sum': 100
});

Or see the CodePen: https://codepen.io/Lexachoc/pen/EaWEpLx

Set editType of attrs.sum to 'calc' for normalization.
@Lexachoc Lexachoc changed the title Fix ternary.sum relayout recalculation Fix ternary.sum relayout recalculation Oct 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG]; Changing layout.ternary.sum via relayout makes scatterternary data stale

1 participant