diff --git a/draftlogs/8128_fix.md b/draftlogs/8128_fix.md new file mode 100644 index 00000000000..074a5f73357 --- /dev/null +++ b/draftlogs/8128_fix.md @@ -0,0 +1 @@ +- Fix `ternary.sum` relayout to recalculate ternary trace data [[#8128](https://github.com/plotly/plotly.js/pull/8128)] diff --git a/src/plots/ternary/layout_attributes.js b/src/plots/ternary/layout_attributes.js index 752837ca92b..363e6851714 100644 --- a/src/plots/ternary/layout_attributes.js +++ b/src/plots/ternary/layout_attributes.js @@ -98,6 +98,9 @@ var attrs = module.exports = overrideAll({ caxis: ternaryAxesAttrs }, 'plot', 'from-root'); +// ternary.sum is used by calc to normalize +attrs.sum.editType = 'calc'; + // set uirevisions outside of `overrideAll` so we can get `editType: none` attrs.uirevision = { valType: 'any', diff --git a/test/plot-schema.json b/test/plot-schema.json index 4d51312e82d..2783212ffbc 100644 --- a/test/plot-schema.json +++ b/test/plot-schema.json @@ -12427,7 +12427,7 @@ "sum": { "description": "The number each triplet should sum to, and the maximum range of each axis", "dflt": 1, - "editType": "plot", + "editType": "calc", "min": 0, "valType": "number" },