@@ -2140,30 +2140,24 @@ def spikedistance(self, val):
2140
2140
@property
2141
2141
def template (self ):
2142
2142
"""
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
2161
2148
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
2163
2157
2164
2158
Returns
2165
2159
-------
2166
- Any
2160
+ plotly.graph_objs.layout.Template
2167
2161
"""
2168
2162
return self ['template' ]
2169
2163
@@ -3446,26 +3440,8 @@ def _prop_descriptions(self):
3446
3440
objects can be hovered on but will not generate
3447
3441
spikelines, such as scatter fills.
3448
3442
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
3469
3445
ternary
3470
3446
plotly.graph_objs.layout.Ternary instance or dict with
3471
3447
compatible properties
@@ -3770,26 +3746,8 @@ def __init__(
3770
3746
objects can be hovered on but will not generate
3771
3747
spikelines, such as scatter fills.
3772
3748
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
3793
3751
ternary
3794
3752
plotly.graph_objs.layout.Ternary instance or dict with
3795
3753
compatible properties
@@ -4010,7 +3968,9 @@ def __init__(
4010
3968
self ['spikedistance'
4011
3969
] = spikedistance if spikedistance is not None else _v
4012
3970
_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
4014
3974
_v = arg .pop ('ternary' , None )
4015
3975
self ['ternary' ] = ternary if ternary is not None else _v
4016
3976
_v = arg .pop ('title' , None )
0 commit comments