@@ -2140,30 +2140,24 @@ def spikedistance(self, val):
21402140 @property
21412141 def template (self ):
21422142 """
2143- Default attributes to be applied to the plot. Templates can be
2144- created from existing plots using `Plotly.makeTemplate`, or
2145- created manually. They should be objects with format: `{layout:
2146- layoutTemplate, data: {[type]: [traceTemplate, ...]}, ...}`
2147- `layoutTemplate` and `traceTemplate` are objects matching the
2148- attribute structure of `layout` and a data trace. Trace
2149- templates are applied cyclically to traces of each type.
2150- Container arrays (eg `annotations`) have special handling: An
2151- object ending in `defaults` (eg `annotationdefaults`) is
2152- applied to each array item. But if an item has a
2153- `templateitemname` key we look in the template array for an
2154- item with matching `name` and apply that instead. If no
2155- matching `name` is found we mark the item invisible. Any named
2156- template item not referenced is appended to the end of the
2157- array, so you can use this for a watermark annotation or a logo
2158- image, for example. To omit one of these items on the plot,
2159- make an item with matching `templateitemname` and `visible:
2160- false`.
2143+ The 'template' property is an instance of Template
2144+ that may be specified as:
2145+ - An instance of plotly.graph_objs.layout.Template
2146+ - A dict of string/value properties that will be passed
2147+ to the Template constructor
21612148
2162- The 'template' property accepts values of any type
2149+ Supported dict properties:
2150+
2151+ data
2152+ plotly.graph_objs.layout.template.Data instance
2153+ or dict with compatible properties
2154+ layout
2155+ plotly.graph_objs.layout.template.Layout
2156+ instance or dict with compatible properties
21632157
21642158 Returns
21652159 -------
2166- Any
2160+ plotly.graph_objs.layout.Template
21672161 """
21682162 return self ['template' ]
21692163
@@ -3446,26 +3440,8 @@ def _prop_descriptions(self):
34463440 objects can be hovered on but will not generate
34473441 spikelines, such as scatter fills.
34483442 template
3449- Default attributes to be applied to the plot. Templates
3450- can be created from existing plots using
3451- `Plotly.makeTemplate`, or created manually. They should
3452- be objects with format: `{layout: layoutTemplate, data:
3453- {[type]: [traceTemplate, ...]}, ...}` `layoutTemplate`
3454- and `traceTemplate` are objects matching the attribute
3455- structure of `layout` and a data trace. Trace
3456- templates are applied cyclically to traces of each
3457- type. Container arrays (eg `annotations`) have special
3458- handling: An object ending in `defaults` (eg
3459- `annotationdefaults`) is applied to each array item.
3460- But if an item has a `templateitemname` key we look in
3461- the template array for an item with matching `name` and
3462- apply that instead. If no matching `name` is found we
3463- mark the item invisible. Any named template item not
3464- referenced is appended to the end of the array, so you
3465- can use this for a watermark annotation or a logo
3466- image, for example. To omit one of these items on the
3467- plot, make an item with matching `templateitemname` and
3468- `visible: false`.
3443+ plotly.graph_objs.layout.Template instance or dict with
3444+ compatible properties
34693445 ternary
34703446 plotly.graph_objs.layout.Ternary instance or dict with
34713447 compatible properties
@@ -3770,26 +3746,8 @@ def __init__(
37703746 objects can be hovered on but will not generate
37713747 spikelines, such as scatter fills.
37723748 template
3773- Default attributes to be applied to the plot. Templates
3774- can be created from existing plots using
3775- `Plotly.makeTemplate`, or created manually. They should
3776- be objects with format: `{layout: layoutTemplate, data:
3777- {[type]: [traceTemplate, ...]}, ...}` `layoutTemplate`
3778- and `traceTemplate` are objects matching the attribute
3779- structure of `layout` and a data trace. Trace
3780- templates are applied cyclically to traces of each
3781- type. Container arrays (eg `annotations`) have special
3782- handling: An object ending in `defaults` (eg
3783- `annotationdefaults`) is applied to each array item.
3784- But if an item has a `templateitemname` key we look in
3785- the template array for an item with matching `name` and
3786- apply that instead. If no matching `name` is found we
3787- mark the item invisible. Any named template item not
3788- referenced is appended to the end of the array, so you
3789- can use this for a watermark annotation or a logo
3790- image, for example. To omit one of these items on the
3791- plot, make an item with matching `templateitemname` and
3792- `visible: false`.
3749+ plotly.graph_objs.layout.Template instance or dict with
3750+ compatible properties
37933751 ternary
37943752 plotly.graph_objs.layout.Ternary instance or dict with
37953753 compatible properties
@@ -4010,7 +3968,9 @@ def __init__(
40103968 self ['spikedistance'
40113969 ] = spikedistance if spikedistance is not None else _v
40123970 _v = arg .pop ('template' , None )
4013- self ['template' ] = template if template is not None else _v
3971+ _v = template if template is not None else _v
3972+ if _v is not None :
3973+ self ['template' ] = _v
40143974 _v = arg .pop ('ternary' , None )
40153975 self ['ternary' ] = ternary if ternary is not None else _v
40163976 _v = arg .pop ('title' , None )
0 commit comments