From 1f15956a1264649bf9f36c4e55347c94d07904ad Mon Sep 17 00:00:00 2001 From: Martha Cryan Date: Fri, 22 Nov 2024 15:24:21 -0600 Subject: [PATCH] Switch template edit type to plot --- src/plots/layout_attributes.js | 2 +- test/plot-schema.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plots/layout_attributes.js b/src/plots/layout_attributes.js index 60540e53b94..0dc7dd6b412 100644 --- a/src/plots/layout_attributes.js +++ b/src/plots/layout_attributes.js @@ -402,7 +402,7 @@ module.exports = { }, template: { valType: 'any', - editType: 'calc', + editType: 'plot', description: [ 'Default attributes to be applied to the plot. Templates can be', 'created from existing plots using `Plotly.makeTemplate`, or', diff --git a/test/plot-schema.json b/test/plot-schema.json index 6aa77cf3338..4907f5568cf 100644 --- a/test/plot-schema.json +++ b/test/plot-schema.json @@ -11074,7 +11074,7 @@ }, "template": { "description": "Default attributes to be applied to the plot. Templates can be created from existing plots using `Plotly.makeTemplate`, or created manually. They should be objects with format: `{layout: layoutTemplate, data: {[type]: [traceTemplate, ...]}, ...}` `layoutTemplate` and `traceTemplate` are objects matching the attribute structure of `layout` and a data trace. Trace templates are applied cyclically to traces of each type. Container arrays (eg `annotations`) have special handling: An object ending in `defaults` (eg `annotationdefaults`) is applied to each array item. But if an item has a `templateitemname` key we look in the template array for an item with matching `name` and apply that instead. If no matching `name` is found we mark the item invisible. Any named template item not referenced is appended to the end of the array, so you can use this for a watermark annotation or a logo image, for example. To omit one of these items on the plot, make an item with matching `templateitemname` and `visible: false`.", - "editType": "calc", + "editType": "plot", "valType": "any" }, "ternary": {