done
This commit is contained in:
		| @ -0,0 +1,17 @@ | ||||
| import sys | ||||
| from typing import TYPE_CHECKING | ||||
|  | ||||
| if TYPE_CHECKING: | ||||
|     from ._circle import Circle | ||||
|     from ._fill import Fill | ||||
|     from ._line import Line | ||||
|     from ._symbol import Symbol | ||||
|     from . import symbol | ||||
| else: | ||||
|     from _plotly_utils.importers import relative_import | ||||
|  | ||||
|     __all__, __getattr__, __dir__ = relative_import( | ||||
|         __name__, | ||||
|         [".symbol"], | ||||
|         ["._circle.Circle", "._fill.Fill", "._line.Line", "._symbol.Symbol"], | ||||
|     ) | ||||
| @ -0,0 +1,82 @@ | ||||
| #                   --- THIS FILE IS AUTO-GENERATED --- | ||||
| # Modifications will be overwitten the next time code generation run. | ||||
|  | ||||
| from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType | ||||
| import copy as _copy | ||||
|  | ||||
|  | ||||
| class Circle(_BaseLayoutHierarchyType): | ||||
|     _parent_path_str = "layout.mapbox.layer" | ||||
|     _path_str = "layout.mapbox.layer.circle" | ||||
|     _valid_props = {"radius"} | ||||
|  | ||||
|     @property | ||||
|     def radius(self): | ||||
|         """ | ||||
|         Sets the circle radius (mapbox.layer.paint.circle-radius). Has | ||||
|         an effect only when `type` is set to "circle". | ||||
|  | ||||
|         The 'radius' property is a number and may be specified as: | ||||
|           - An int or float | ||||
|  | ||||
|         Returns | ||||
|         ------- | ||||
|         int|float | ||||
|         """ | ||||
|         return self["radius"] | ||||
|  | ||||
|     @radius.setter | ||||
|     def radius(self, val): | ||||
|         self["radius"] = val | ||||
|  | ||||
|     @property | ||||
|     def _prop_descriptions(self): | ||||
|         return """\ | ||||
|         radius | ||||
|             Sets the circle radius (mapbox.layer.paint.circle- | ||||
|             radius). Has an effect only when `type` is set to | ||||
|             "circle". | ||||
|         """ | ||||
|  | ||||
|     def __init__(self, arg=None, radius=None, **kwargs): | ||||
|         """ | ||||
|         Construct a new Circle object | ||||
|  | ||||
|         Parameters | ||||
|         ---------- | ||||
|         arg | ||||
|             dict of properties compatible with this constructor or | ||||
|             an instance of | ||||
|             :class:`plotly.graph_objs.layout.mapbox.layer.Circle` | ||||
|         radius | ||||
|             Sets the circle radius (mapbox.layer.paint.circle- | ||||
|             radius). Has an effect only when `type` is set to | ||||
|             "circle". | ||||
|  | ||||
|         Returns | ||||
|         ------- | ||||
|         Circle | ||||
|         """ | ||||
|         super().__init__("circle") | ||||
|         if "_parent" in kwargs: | ||||
|             self._parent = kwargs["_parent"] | ||||
|             return | ||||
|  | ||||
|         if arg is None: | ||||
|             arg = {} | ||||
|         elif isinstance(arg, self.__class__): | ||||
|             arg = arg.to_plotly_json() | ||||
|         elif isinstance(arg, dict): | ||||
|             arg = _copy.copy(arg) | ||||
|         else: | ||||
|             raise ValueError("""\ | ||||
| The first argument to the plotly.graph_objs.layout.mapbox.layer.Circle | ||||
| constructor must be a dict or | ||||
| an instance of :class:`plotly.graph_objs.layout.mapbox.layer.Circle`""") | ||||
|  | ||||
|         self._skip_invalid = kwargs.pop("skip_invalid", False) | ||||
|         self._validate = kwargs.pop("_validate", True) | ||||
|  | ||||
|         self._set_property("radius", arg, radius) | ||||
|         self._process_kwargs(**dict(arg, **kwargs)) | ||||
|         self._skip_invalid = False | ||||
| @ -0,0 +1,86 @@ | ||||
| #                   --- THIS FILE IS AUTO-GENERATED --- | ||||
| # Modifications will be overwitten the next time code generation run. | ||||
|  | ||||
| from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType | ||||
| import copy as _copy | ||||
|  | ||||
|  | ||||
| class Fill(_BaseLayoutHierarchyType): | ||||
|     _parent_path_str = "layout.mapbox.layer" | ||||
|     _path_str = "layout.mapbox.layer.fill" | ||||
|     _valid_props = {"outlinecolor"} | ||||
|  | ||||
|     @property | ||||
|     def outlinecolor(self): | ||||
|         """ | ||||
|         Sets the fill outline color (mapbox.layer.paint.fill-outline- | ||||
|         color). Has an effect only when `type` is set to "fill". | ||||
|  | ||||
|         The 'outlinecolor' property is a color and may be specified as: | ||||
|           - A hex string (e.g. '#ff0000') | ||||
|           - An rgb/rgba string (e.g. 'rgb(255,0,0)') | ||||
|           - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') | ||||
|           - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') | ||||
|           - A named CSS color: see https://plotly.com/python/css-colors/ for a list | ||||
|  | ||||
|         Returns | ||||
|         ------- | ||||
|         str | ||||
|         """ | ||||
|         return self["outlinecolor"] | ||||
|  | ||||
|     @outlinecolor.setter | ||||
|     def outlinecolor(self, val): | ||||
|         self["outlinecolor"] = val | ||||
|  | ||||
|     @property | ||||
|     def _prop_descriptions(self): | ||||
|         return """\ | ||||
|         outlinecolor | ||||
|             Sets the fill outline color (mapbox.layer.paint.fill- | ||||
|             outline-color). Has an effect only when `type` is set | ||||
|             to "fill". | ||||
|         """ | ||||
|  | ||||
|     def __init__(self, arg=None, outlinecolor=None, **kwargs): | ||||
|         """ | ||||
|         Construct a new Fill object | ||||
|  | ||||
|         Parameters | ||||
|         ---------- | ||||
|         arg | ||||
|             dict of properties compatible with this constructor or | ||||
|             an instance of | ||||
|             :class:`plotly.graph_objs.layout.mapbox.layer.Fill` | ||||
|         outlinecolor | ||||
|             Sets the fill outline color (mapbox.layer.paint.fill- | ||||
|             outline-color). Has an effect only when `type` is set | ||||
|             to "fill". | ||||
|  | ||||
|         Returns | ||||
|         ------- | ||||
|         Fill | ||||
|         """ | ||||
|         super().__init__("fill") | ||||
|         if "_parent" in kwargs: | ||||
|             self._parent = kwargs["_parent"] | ||||
|             return | ||||
|  | ||||
|         if arg is None: | ||||
|             arg = {} | ||||
|         elif isinstance(arg, self.__class__): | ||||
|             arg = arg.to_plotly_json() | ||||
|         elif isinstance(arg, dict): | ||||
|             arg = _copy.copy(arg) | ||||
|         else: | ||||
|             raise ValueError("""\ | ||||
| The first argument to the plotly.graph_objs.layout.mapbox.layer.Fill | ||||
| constructor must be a dict or | ||||
| an instance of :class:`plotly.graph_objs.layout.mapbox.layer.Fill`""") | ||||
|  | ||||
|         self._skip_invalid = kwargs.pop("skip_invalid", False) | ||||
|         self._validate = kwargs.pop("_validate", True) | ||||
|  | ||||
|         self._set_property("outlinecolor", arg, outlinecolor) | ||||
|         self._process_kwargs(**dict(arg, **kwargs)) | ||||
|         self._skip_invalid = False | ||||
| @ -0,0 +1,133 @@ | ||||
| #                   --- THIS FILE IS AUTO-GENERATED --- | ||||
| # Modifications will be overwitten the next time code generation run. | ||||
|  | ||||
| from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType | ||||
| import copy as _copy | ||||
|  | ||||
|  | ||||
| class Line(_BaseLayoutHierarchyType): | ||||
|     _parent_path_str = "layout.mapbox.layer" | ||||
|     _path_str = "layout.mapbox.layer.line" | ||||
|     _valid_props = {"dash", "dashsrc", "width"} | ||||
|  | ||||
|     @property | ||||
|     def dash(self): | ||||
|         """ | ||||
|         Sets the length of dashes and gaps (mapbox.layer.paint.line- | ||||
|         dasharray). Has an effect only when `type` is set to "line". | ||||
|  | ||||
|         The 'dash' property is an array that may be specified as a tuple, | ||||
|         list, numpy array, or pandas Series | ||||
|  | ||||
|         Returns | ||||
|         ------- | ||||
|         numpy.ndarray | ||||
|         """ | ||||
|         return self["dash"] | ||||
|  | ||||
|     @dash.setter | ||||
|     def dash(self, val): | ||||
|         self["dash"] = val | ||||
|  | ||||
|     @property | ||||
|     def dashsrc(self): | ||||
|         """ | ||||
|         Sets the source reference on Chart Studio Cloud for `dash`. | ||||
|  | ||||
|         The 'dashsrc' property must be specified as a string or | ||||
|         as a plotly.grid_objs.Column object | ||||
|  | ||||
|         Returns | ||||
|         ------- | ||||
|         str | ||||
|         """ | ||||
|         return self["dashsrc"] | ||||
|  | ||||
|     @dashsrc.setter | ||||
|     def dashsrc(self, val): | ||||
|         self["dashsrc"] = val | ||||
|  | ||||
|     @property | ||||
|     def width(self): | ||||
|         """ | ||||
|         Sets the line width (mapbox.layer.paint.line-width). Has an | ||||
|         effect only when `type` is set to "line". | ||||
|  | ||||
|         The 'width' property is a number and may be specified as: | ||||
|           - An int or float | ||||
|  | ||||
|         Returns | ||||
|         ------- | ||||
|         int|float | ||||
|         """ | ||||
|         return self["width"] | ||||
|  | ||||
|     @width.setter | ||||
|     def width(self, val): | ||||
|         self["width"] = val | ||||
|  | ||||
|     @property | ||||
|     def _prop_descriptions(self): | ||||
|         return """\ | ||||
|         dash | ||||
|             Sets the length of dashes and gaps | ||||
|             (mapbox.layer.paint.line-dasharray). Has an effect only | ||||
|             when `type` is set to "line". | ||||
|         dashsrc | ||||
|             Sets the source reference on Chart Studio Cloud for | ||||
|             `dash`. | ||||
|         width | ||||
|             Sets the line width (mapbox.layer.paint.line-width). | ||||
|             Has an effect only when `type` is set to "line". | ||||
|         """ | ||||
|  | ||||
|     def __init__(self, arg=None, dash=None, dashsrc=None, width=None, **kwargs): | ||||
|         """ | ||||
|         Construct a new Line object | ||||
|  | ||||
|         Parameters | ||||
|         ---------- | ||||
|         arg | ||||
|             dict of properties compatible with this constructor or | ||||
|             an instance of | ||||
|             :class:`plotly.graph_objs.layout.mapbox.layer.Line` | ||||
|         dash | ||||
|             Sets the length of dashes and gaps | ||||
|             (mapbox.layer.paint.line-dasharray). Has an effect only | ||||
|             when `type` is set to "line". | ||||
|         dashsrc | ||||
|             Sets the source reference on Chart Studio Cloud for | ||||
|             `dash`. | ||||
|         width | ||||
|             Sets the line width (mapbox.layer.paint.line-width). | ||||
|             Has an effect only when `type` is set to "line". | ||||
|  | ||||
|         Returns | ||||
|         ------- | ||||
|         Line | ||||
|         """ | ||||
|         super().__init__("line") | ||||
|         if "_parent" in kwargs: | ||||
|             self._parent = kwargs["_parent"] | ||||
|             return | ||||
|  | ||||
|         if arg is None: | ||||
|             arg = {} | ||||
|         elif isinstance(arg, self.__class__): | ||||
|             arg = arg.to_plotly_json() | ||||
|         elif isinstance(arg, dict): | ||||
|             arg = _copy.copy(arg) | ||||
|         else: | ||||
|             raise ValueError("""\ | ||||
| The first argument to the plotly.graph_objs.layout.mapbox.layer.Line | ||||
| constructor must be a dict or | ||||
| an instance of :class:`plotly.graph_objs.layout.mapbox.layer.Line`""") | ||||
|  | ||||
|         self._skip_invalid = kwargs.pop("skip_invalid", False) | ||||
|         self._validate = kwargs.pop("_validate", True) | ||||
|  | ||||
|         self._set_property("dash", arg, dash) | ||||
|         self._set_property("dashsrc", arg, dashsrc) | ||||
|         self._set_property("width", arg, width) | ||||
|         self._process_kwargs(**dict(arg, **kwargs)) | ||||
|         self._skip_invalid = False | ||||
| @ -0,0 +1,245 @@ | ||||
| #                   --- THIS FILE IS AUTO-GENERATED --- | ||||
| # Modifications will be overwitten the next time code generation run. | ||||
|  | ||||
| from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType | ||||
| import copy as _copy | ||||
|  | ||||
|  | ||||
| class Symbol(_BaseLayoutHierarchyType): | ||||
|     _parent_path_str = "layout.mapbox.layer" | ||||
|     _path_str = "layout.mapbox.layer.symbol" | ||||
|     _valid_props = {"icon", "iconsize", "placement", "text", "textfont", "textposition"} | ||||
|  | ||||
|     @property | ||||
|     def icon(self): | ||||
|         """ | ||||
|         Sets the symbol icon image (mapbox.layer.layout.icon-image). | ||||
|         Full list: https://www.mapbox.com/maki-icons/ | ||||
|  | ||||
|         The 'icon' property is a string and must be specified as: | ||||
|           - A string | ||||
|           - A number that will be converted to a string | ||||
|  | ||||
|         Returns | ||||
|         ------- | ||||
|         str | ||||
|         """ | ||||
|         return self["icon"] | ||||
|  | ||||
|     @icon.setter | ||||
|     def icon(self, val): | ||||
|         self["icon"] = val | ||||
|  | ||||
|     @property | ||||
|     def iconsize(self): | ||||
|         """ | ||||
|         Sets the symbol icon size (mapbox.layer.layout.icon-size). Has | ||||
|         an effect only when `type` is set to "symbol". | ||||
|  | ||||
|         The 'iconsize' property is a number and may be specified as: | ||||
|           - An int or float | ||||
|  | ||||
|         Returns | ||||
|         ------- | ||||
|         int|float | ||||
|         """ | ||||
|         return self["iconsize"] | ||||
|  | ||||
|     @iconsize.setter | ||||
|     def iconsize(self, val): | ||||
|         self["iconsize"] = val | ||||
|  | ||||
|     @property | ||||
|     def placement(self): | ||||
|         """ | ||||
|         Sets the symbol and/or text placement | ||||
|         (mapbox.layer.layout.symbol-placement). If `placement` is | ||||
|         "point", the label is placed where the geometry is located If | ||||
|         `placement` is "line", the label is placed along the line of | ||||
|         the geometry If `placement` is "line-center", the label is | ||||
|         placed on the center of the geometry | ||||
|  | ||||
|         The 'placement' property is an enumeration that may be specified as: | ||||
|           - One of the following enumeration values: | ||||
|                 ['point', 'line', 'line-center'] | ||||
|  | ||||
|         Returns | ||||
|         ------- | ||||
|         Any | ||||
|         """ | ||||
|         return self["placement"] | ||||
|  | ||||
|     @placement.setter | ||||
|     def placement(self, val): | ||||
|         self["placement"] = val | ||||
|  | ||||
|     @property | ||||
|     def text(self): | ||||
|         """ | ||||
|         Sets the symbol text (mapbox.layer.layout.text-field). | ||||
|  | ||||
|         The 'text' property is a string and must be specified as: | ||||
|           - A string | ||||
|           - A number that will be converted to a string | ||||
|  | ||||
|         Returns | ||||
|         ------- | ||||
|         str | ||||
|         """ | ||||
|         return self["text"] | ||||
|  | ||||
|     @text.setter | ||||
|     def text(self, val): | ||||
|         self["text"] = val | ||||
|  | ||||
|     @property | ||||
|     def textfont(self): | ||||
|         """ | ||||
|         Sets the icon text font (color=mapbox.layer.paint.text-color, | ||||
|         size=mapbox.layer.layout.text-size). Has an effect only when | ||||
|         `type` is set to "symbol". | ||||
|  | ||||
|         The 'textfont' property is an instance of Textfont | ||||
|         that may be specified as: | ||||
|           - An instance of :class:`plotly.graph_objs.layout.mapbox.layer.symbol.Textfont` | ||||
|           - A dict of string/value properties that will be passed | ||||
|             to the Textfont constructor | ||||
|  | ||||
|         Returns | ||||
|         ------- | ||||
|         plotly.graph_objs.layout.mapbox.layer.symbol.Textfont | ||||
|         """ | ||||
|         return self["textfont"] | ||||
|  | ||||
|     @textfont.setter | ||||
|     def textfont(self, val): | ||||
|         self["textfont"] = val | ||||
|  | ||||
|     @property | ||||
|     def textposition(self): | ||||
|         """ | ||||
|         Sets the positions of the `text` elements with respects to the | ||||
|         (x,y) coordinates. | ||||
|  | ||||
|         The 'textposition' property is an enumeration that may be specified as: | ||||
|           - One of the following enumeration values: | ||||
|                 ['top left', 'top center', 'top right', 'middle left', | ||||
|                 'middle center', 'middle right', 'bottom left', 'bottom | ||||
|                 center', 'bottom right'] | ||||
|  | ||||
|         Returns | ||||
|         ------- | ||||
|         Any | ||||
|         """ | ||||
|         return self["textposition"] | ||||
|  | ||||
|     @textposition.setter | ||||
|     def textposition(self, val): | ||||
|         self["textposition"] = val | ||||
|  | ||||
|     @property | ||||
|     def _prop_descriptions(self): | ||||
|         return """\ | ||||
|         icon | ||||
|             Sets the symbol icon image (mapbox.layer.layout.icon- | ||||
|             image). Full list: https://www.mapbox.com/maki-icons/ | ||||
|         iconsize | ||||
|             Sets the symbol icon size (mapbox.layer.layout.icon- | ||||
|             size). Has an effect only when `type` is set to | ||||
|             "symbol". | ||||
|         placement | ||||
|             Sets the symbol and/or text placement | ||||
|             (mapbox.layer.layout.symbol-placement). If `placement` | ||||
|             is "point", the label is placed where the geometry is | ||||
|             located If `placement` is "line", the label is placed | ||||
|             along the line of the geometry If `placement` is "line- | ||||
|             center", the label is placed on the center of the | ||||
|             geometry | ||||
|         text | ||||
|             Sets the symbol text (mapbox.layer.layout.text-field). | ||||
|         textfont | ||||
|             Sets the icon text font (color=mapbox.layer.paint.text- | ||||
|             color, size=mapbox.layer.layout.text-size). Has an | ||||
|             effect only when `type` is set to "symbol". | ||||
|         textposition | ||||
|             Sets the positions of the `text` elements with respects | ||||
|             to the (x,y) coordinates. | ||||
|         """ | ||||
|  | ||||
|     def __init__( | ||||
|         self, | ||||
|         arg=None, | ||||
|         icon=None, | ||||
|         iconsize=None, | ||||
|         placement=None, | ||||
|         text=None, | ||||
|         textfont=None, | ||||
|         textposition=None, | ||||
|         **kwargs, | ||||
|     ): | ||||
|         """ | ||||
|         Construct a new Symbol object | ||||
|  | ||||
|         Parameters | ||||
|         ---------- | ||||
|         arg | ||||
|             dict of properties compatible with this constructor or | ||||
|             an instance of | ||||
|             :class:`plotly.graph_objs.layout.mapbox.layer.Symbol` | ||||
|         icon | ||||
|             Sets the symbol icon image (mapbox.layer.layout.icon- | ||||
|             image). Full list: https://www.mapbox.com/maki-icons/ | ||||
|         iconsize | ||||
|             Sets the symbol icon size (mapbox.layer.layout.icon- | ||||
|             size). Has an effect only when `type` is set to | ||||
|             "symbol". | ||||
|         placement | ||||
|             Sets the symbol and/or text placement | ||||
|             (mapbox.layer.layout.symbol-placement). If `placement` | ||||
|             is "point", the label is placed where the geometry is | ||||
|             located If `placement` is "line", the label is placed | ||||
|             along the line of the geometry If `placement` is "line- | ||||
|             center", the label is placed on the center of the | ||||
|             geometry | ||||
|         text | ||||
|             Sets the symbol text (mapbox.layer.layout.text-field). | ||||
|         textfont | ||||
|             Sets the icon text font (color=mapbox.layer.paint.text- | ||||
|             color, size=mapbox.layer.layout.text-size). Has an | ||||
|             effect only when `type` is set to "symbol". | ||||
|         textposition | ||||
|             Sets the positions of the `text` elements with respects | ||||
|             to the (x,y) coordinates. | ||||
|  | ||||
|         Returns | ||||
|         ------- | ||||
|         Symbol | ||||
|         """ | ||||
|         super().__init__("symbol") | ||||
|         if "_parent" in kwargs: | ||||
|             self._parent = kwargs["_parent"] | ||||
|             return | ||||
|  | ||||
|         if arg is None: | ||||
|             arg = {} | ||||
|         elif isinstance(arg, self.__class__): | ||||
|             arg = arg.to_plotly_json() | ||||
|         elif isinstance(arg, dict): | ||||
|             arg = _copy.copy(arg) | ||||
|         else: | ||||
|             raise ValueError("""\ | ||||
| The first argument to the plotly.graph_objs.layout.mapbox.layer.Symbol | ||||
| constructor must be a dict or | ||||
| an instance of :class:`plotly.graph_objs.layout.mapbox.layer.Symbol`""") | ||||
|  | ||||
|         self._skip_invalid = kwargs.pop("skip_invalid", False) | ||||
|         self._validate = kwargs.pop("_validate", True) | ||||
|  | ||||
|         self._set_property("icon", arg, icon) | ||||
|         self._set_property("iconsize", arg, iconsize) | ||||
|         self._set_property("placement", arg, placement) | ||||
|         self._set_property("text", arg, text) | ||||
|         self._set_property("textfont", arg, textfont) | ||||
|         self._set_property("textposition", arg, textposition) | ||||
|         self._process_kwargs(**dict(arg, **kwargs)) | ||||
|         self._skip_invalid = False | ||||
| @ -0,0 +1,11 @@ | ||||
| import sys | ||||
| from typing import TYPE_CHECKING | ||||
|  | ||||
| if TYPE_CHECKING: | ||||
|     from ._textfont import Textfont | ||||
| else: | ||||
|     from _plotly_utils.importers import relative_import | ||||
|  | ||||
|     __all__, __getattr__, __dir__ = relative_import( | ||||
|         __name__, [], ["._textfont.Textfont"] | ||||
|     ) | ||||
| @ -0,0 +1,202 @@ | ||||
| #                   --- THIS FILE IS AUTO-GENERATED --- | ||||
| # Modifications will be overwitten the next time code generation run. | ||||
|  | ||||
| from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType | ||||
| import copy as _copy | ||||
|  | ||||
|  | ||||
| class Textfont(_BaseLayoutHierarchyType): | ||||
|     _parent_path_str = "layout.mapbox.layer.symbol" | ||||
|     _path_str = "layout.mapbox.layer.symbol.textfont" | ||||
|     _valid_props = {"color", "family", "size", "style", "weight"} | ||||
|  | ||||
|     @property | ||||
|     def color(self): | ||||
|         """ | ||||
|         The 'color' property is a color and may be specified as: | ||||
|           - A hex string (e.g. '#ff0000') | ||||
|           - An rgb/rgba string (e.g. 'rgb(255,0,0)') | ||||
|           - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') | ||||
|           - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') | ||||
|           - A named CSS color: see https://plotly.com/python/css-colors/ for a list | ||||
|  | ||||
|         Returns | ||||
|         ------- | ||||
|         str | ||||
|         """ | ||||
|         return self["color"] | ||||
|  | ||||
|     @color.setter | ||||
|     def color(self, val): | ||||
|         self["color"] = val | ||||
|  | ||||
|     @property | ||||
|     def family(self): | ||||
|         """ | ||||
|         HTML font family - the typeface that will be applied by the web | ||||
|         browser. The web browser can only apply a font if it is | ||||
|         available on the system where it runs. Provide multiple font | ||||
|         families, separated by commas, to indicate the order in which | ||||
|         to apply fonts if they aren't available. | ||||
|  | ||||
|         The 'family' property is a string and must be specified as: | ||||
|           - A non-empty string | ||||
|  | ||||
|         Returns | ||||
|         ------- | ||||
|         str | ||||
|         """ | ||||
|         return self["family"] | ||||
|  | ||||
|     @family.setter | ||||
|     def family(self, val): | ||||
|         self["family"] = val | ||||
|  | ||||
|     @property | ||||
|     def size(self): | ||||
|         """ | ||||
|         The 'size' property is a number and may be specified as: | ||||
|           - An int or float in the interval [1, inf] | ||||
|  | ||||
|         Returns | ||||
|         ------- | ||||
|         int|float | ||||
|         """ | ||||
|         return self["size"] | ||||
|  | ||||
|     @size.setter | ||||
|     def size(self, val): | ||||
|         self["size"] = val | ||||
|  | ||||
|     @property | ||||
|     def style(self): | ||||
|         """ | ||||
|         Sets whether a font should be styled with a normal or italic | ||||
|         face from its family. | ||||
|  | ||||
|         The 'style' property is an enumeration that may be specified as: | ||||
|           - One of the following enumeration values: | ||||
|                 ['normal', 'italic'] | ||||
|  | ||||
|         Returns | ||||
|         ------- | ||||
|         Any | ||||
|         """ | ||||
|         return self["style"] | ||||
|  | ||||
|     @style.setter | ||||
|     def style(self, val): | ||||
|         self["style"] = val | ||||
|  | ||||
|     @property | ||||
|     def weight(self): | ||||
|         """ | ||||
|         Sets the weight (or boldness) of the font. | ||||
|  | ||||
|         The 'weight' property is a integer and may be specified as: | ||||
|           - An int (or float that will be cast to an int) | ||||
|             in the interval [1, 1000] | ||||
|             OR exactly one of ['normal', 'bold'] (e.g. 'bold') | ||||
|  | ||||
|         Returns | ||||
|         ------- | ||||
|         int | ||||
|         """ | ||||
|         return self["weight"] | ||||
|  | ||||
|     @weight.setter | ||||
|     def weight(self, val): | ||||
|         self["weight"] = val | ||||
|  | ||||
|     @property | ||||
|     def _prop_descriptions(self): | ||||
|         return """\ | ||||
|         color | ||||
|  | ||||
|         family | ||||
|             HTML font family - the typeface that will be applied by | ||||
|             the web browser. The web browser can only apply a font | ||||
|             if it is available on the system where it runs. Provide | ||||
|             multiple font families, separated by commas, to | ||||
|             indicate the order in which to apply fonts if they | ||||
|             aren't available. | ||||
|         size | ||||
|  | ||||
|         style | ||||
|             Sets whether a font should be styled with a normal or | ||||
|             italic face from its family. | ||||
|         weight | ||||
|             Sets the weight (or boldness) of the font. | ||||
|         """ | ||||
|  | ||||
|     def __init__( | ||||
|         self, | ||||
|         arg=None, | ||||
|         color=None, | ||||
|         family=None, | ||||
|         size=None, | ||||
|         style=None, | ||||
|         weight=None, | ||||
|         **kwargs, | ||||
|     ): | ||||
|         """ | ||||
|         Construct a new Textfont object | ||||
|  | ||||
|         Sets the icon text font (color=mapbox.layer.paint.text-color, | ||||
|         size=mapbox.layer.layout.text-size). Has an effect only when | ||||
|         `type` is set to "symbol". | ||||
|  | ||||
|         Parameters | ||||
|         ---------- | ||||
|         arg | ||||
|             dict of properties compatible with this constructor or | ||||
|             an instance of :class:`plotly.graph_objs.layout.mapbox. | ||||
|             layer.symbol.Textfont` | ||||
|         color | ||||
|  | ||||
|         family | ||||
|             HTML font family - the typeface that will be applied by | ||||
|             the web browser. The web browser can only apply a font | ||||
|             if it is available on the system where it runs. Provide | ||||
|             multiple font families, separated by commas, to | ||||
|             indicate the order in which to apply fonts if they | ||||
|             aren't available. | ||||
|         size | ||||
|  | ||||
|         style | ||||
|             Sets whether a font should be styled with a normal or | ||||
|             italic face from its family. | ||||
|         weight | ||||
|             Sets the weight (or boldness) of the font. | ||||
|  | ||||
|         Returns | ||||
|         ------- | ||||
|         Textfont | ||||
|         """ | ||||
|         super().__init__("textfont") | ||||
|         if "_parent" in kwargs: | ||||
|             self._parent = kwargs["_parent"] | ||||
|             return | ||||
|  | ||||
|         if arg is None: | ||||
|             arg = {} | ||||
|         elif isinstance(arg, self.__class__): | ||||
|             arg = arg.to_plotly_json() | ||||
|         elif isinstance(arg, dict): | ||||
|             arg = _copy.copy(arg) | ||||
|         else: | ||||
|             raise ValueError("""\ | ||||
| The first argument to the plotly.graph_objs.layout.mapbox.layer.symbol.Textfont | ||||
| constructor must be a dict or | ||||
| an instance of :class:`plotly.graph_objs.layout.mapbox.layer.symbol.Textfont`""") | ||||
|  | ||||
|         self._skip_invalid = kwargs.pop("skip_invalid", False) | ||||
|         self._validate = kwargs.pop("_validate", True) | ||||
|  | ||||
|         self._set_property("color", arg, color) | ||||
|         self._set_property("family", arg, family) | ||||
|         self._set_property("size", arg, size) | ||||
|         self._set_property("style", arg, style) | ||||
|         self._set_property("weight", arg, weight) | ||||
|         self._process_kwargs(**dict(arg, **kwargs)) | ||||
|         self._skip_invalid = False | ||||
		Reference in New Issue
	
	Block a user